Skip to content

Commit

Permalink
Rollup merge of #63333 - jethrogb:jb/error-codes-features, r=Mark-Sim…
Browse files Browse the repository at this point in the history
…ulacrum

Remove unnecessary features from compiler error code list
  • Loading branch information
Centril authored Aug 6, 2019
2 parents 2c81d60 + c22cc1d commit c8ea26e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/librustc_mir/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2027,15 +2027,13 @@ Local variables, function parameters and temporaries are all dropped before the
end of the function body. So a reference to them cannot be returned.
```compile_fail,E0515
#![feature(nll)]
fn get_dangling_reference() -> &'static i32 {
let x = 0;
&x
}
```
```compile_fail,E0515
#![feature(nll)]
use std::slice::Iter;
fn get_dangling_iterator<'a>() -> Iter<'a, i32> {
let v = vec![1, 2, 3];
Expand Down Expand Up @@ -2233,7 +2231,6 @@ function which outlived the lifetime of the function.
Example of erroneous code:
```compile_fail,E0712
#![feature(nll)]
#![feature(thread_local)]
#[thread_local]
Expand Down Expand Up @@ -2286,8 +2283,6 @@ not run while the string-data is borrowed; for example by taking `S`
by reference:
```
#![feature(nll)]
pub struct S<'a> { data: &'a mut String }
impl<'a> Drop for S<'a> {
Expand All @@ -2312,7 +2307,6 @@ while a borrow is still in active use.
Erroneous code example:
```compile_fail,E0716
# #![feature(nll)]
fn foo() -> i32 { 22 }
fn bar(x: &i32) -> &i32 { x }
let p = bar(&foo());
Expand Down

0 comments on commit c8ea26e

Please sign in to comment.