librustc: Remove the &LIFETIME EXPR
production from the language.
This was parsed by the parser but completely ignored; not even stored in the AST! This breaks code that looks like: static X: &'static [u8] = &'static [1, 2, 3]; Change this code to the shorter: static X: &'static [u8] = &[1, 2, 3]; Closes #15312. [breaking-change]
This commit is contained in:
parent
1bff1ff810
commit
29ec2506ab
13 changed files with 23 additions and 27 deletions
|
@ -540,7 +540,7 @@ impl LintPass for UnusedAttribute {
|
|||
}
|
||||
|
||||
fn check_attribute(&mut self, cx: &Context, attr: &ast::Attribute) {
|
||||
static ATTRIBUTE_WHITELIST: &'static [&'static str] = &'static [
|
||||
static ATTRIBUTE_WHITELIST: &'static [&'static str] = &[
|
||||
// FIXME: #14408 whitelist docs since rustdoc looks at them
|
||||
"doc",
|
||||
|
||||
|
@ -574,7 +574,7 @@ impl LintPass for UnusedAttribute {
|
|||
"unstable",
|
||||
];
|
||||
|
||||
static CRATE_ATTRS: &'static [&'static str] = &'static [
|
||||
static CRATE_ATTRS: &'static [&'static str] = &[
|
||||
"crate_type",
|
||||
"feature",
|
||||
"no_start",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue