Skip to content

Commit c8ea26e

Browse files
authored
Rollup merge of rust-lang#63333 - jethrogb:jb/error-codes-features, r=Mark-Simulacrum
Remove unnecessary features from compiler error code list
2 parents 2c81d60 + c22cc1d commit c8ea26e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/librustc_mir/error_codes.rs

-6
Original file line numberDiff line numberDiff line change
@@ -2027,15 +2027,13 @@ Local variables, function parameters and temporaries are all dropped before the
20272027
end of the function body. So a reference to them cannot be returned.
20282028
20292029
```compile_fail,E0515
2030-
#![feature(nll)]
20312030
fn get_dangling_reference() -> &'static i32 {
20322031
let x = 0;
20332032
&x
20342033
}
20352034
```
20362035
20372036
```compile_fail,E0515
2038-
#![feature(nll)]
20392037
use std::slice::Iter;
20402038
fn get_dangling_iterator<'a>() -> Iter<'a, i32> {
20412039
let v = vec![1, 2, 3];
@@ -2233,7 +2231,6 @@ function which outlived the lifetime of the function.
22332231
Example of erroneous code:
22342232
22352233
```compile_fail,E0712
2236-
#![feature(nll)]
22372234
#![feature(thread_local)]
22382235
22392236
#[thread_local]
@@ -2286,8 +2283,6 @@ not run while the string-data is borrowed; for example by taking `S`
22862283
by reference:
22872284
22882285
```
2289-
#![feature(nll)]
2290-
22912286
pub struct S<'a> { data: &'a mut String }
22922287
22932288
impl<'a> Drop for S<'a> {
@@ -2312,7 +2307,6 @@ while a borrow is still in active use.
23122307
Erroneous code example:
23132308
23142309
```compile_fail,E0716
2315-
# #![feature(nll)]
23162310
fn foo() -> i32 { 22 }
23172311
fn bar(x: &i32) -> &i32 { x }
23182312
let p = bar(&foo());

0 commit comments

Comments
 (0)