]> git.lizzy.rs Git - rust.git/commitdiff
Use edition flag for 2phase test
authorMatthew Jasper <mjjasper1@gmail.com>
Fri, 5 Apr 2019 09:00:44 +0000 (10:00 +0100)
committerMatthew Jasper <mjjasper1@gmail.com>
Fri, 5 Apr 2019 13:35:31 +0000 (14:35 +0100)
The compiler now rejects one of the examples with #![feature(nll)]

tests/run-pass/2phase.rs

index 5ca0ff5d8df86ed68525be7288aab599fd3bb950..9e50829fade831bfe9858ee5a9f91ce934e43732 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(nll)]
+// edition:2018
 
 trait S: Sized {
     fn tpb(&mut self, _s: Self) {}
@@ -54,6 +54,8 @@ impl<T> Thing for Cell<T> {}
 
     let mut x = Cell::new(1);
     let l = &x;
+
+    #[allow(unknown_lints, mutable_borrow_reservation_conflict)]
     x
         .do_the_thing({
             x.set(3);