Rollup merge of #138911 - compiler-errors:define-opaque, r=oli-obk
Allow defining opaques in statics and consts r? oli-obk Fixes https://github.com/rust-lang/rust/issues/138902
This commit is contained in:
commit
5bd69d940e
19 changed files with 362 additions and 165 deletions
|
@ -698,8 +698,14 @@ impl<'a> ExtCtxt<'a> {
|
|||
name,
|
||||
AttrVec::new(),
|
||||
ast::ItemKind::Static(
|
||||
ast::StaticItem { ty, safety: ast::Safety::Default, mutability, expr: Some(expr) }
|
||||
.into(),
|
||||
ast::StaticItem {
|
||||
ty,
|
||||
safety: ast::Safety::Default,
|
||||
mutability,
|
||||
expr: Some(expr),
|
||||
define_opaque: None,
|
||||
}
|
||||
.into(),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
@ -723,6 +729,7 @@ impl<'a> ExtCtxt<'a> {
|
|||
generics: ast::Generics::default(),
|
||||
ty,
|
||||
expr: Some(expr),
|
||||
define_opaque: None,
|
||||
}
|
||||
.into(),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue