Skip to content

Commit

Permalink
Use output from stable rust and ignore the ui tests on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasEi committed Nov 4, 2021
1 parent 68b2bb9 commit 6c7be3f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions crates/bevy_ecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ serde = "1"
parking_lot = "0.11"
rand = "0.8"
trybuild = "1.0"
rustversion = "1.0"

[[example]]
name = "events"
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_ecs/tests/ui.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[rustversion::attr(not(nightly), ignore)]
#[test]
fn test() {
let t = trybuild::TestCases::new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ error[E0499]: cannot borrow `query` as mutable more than once at a time
--> tests/ui/system_query_get_lifetime_safety.rs:8:14
|
7 | let a1 = query.get_mut(*e).unwrap();
| ----------------- first mutable borrow occurs here
| ----- first mutable borrow occurs here
8 | let a2 = query.get_mut(*e).unwrap();
| ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
| ^^^^^ second mutable borrow occurs here
9 | // this should fail to compile
10 | println!("{} {}", a1.0, a2.0);
| -- first borrow later used here
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ error[E0499]: cannot borrow `query` as mutable more than once at a time
--> tests/ui/system_query_iter_lifetime_safety.rs:10:21
|
7 | let mut iter = query.iter_mut();
| ---------------- first mutable borrow occurs here
| ----- first mutable borrow occurs here
...
10 | let mut iter2 = query.iter_mut();
| ^^^^^^^^^^^^^^^^ second mutable borrow occurs here
| ^^^^^ second mutable borrow occurs here
...
14 | println!("{}", a.0);
| --- first borrow later used here
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ error[E0499]: cannot borrow `queries` as mutable more than once at a time
--> tests/ui/system_query_set_get_lifetime_safety.rs:10:14
|
7 | let mut q2 = queries.q0();
| ------------ first mutable borrow occurs here
| ------- first mutable borrow occurs here
...
10 | let q1 = queries.q1();
| ^^^^^^^^^^^^ second mutable borrow occurs here
| ^^^^^^^ second mutable borrow occurs here
...
14 | b.0 = a.0
| - first borrow later used here
Expand All @@ -14,10 +14,10 @@ error[E0499]: cannot borrow `queries` as mutable more than once at a time
--> tests/ui/system_query_set_get_lifetime_safety.rs:21:18
|
18 | let q1 = queries.q1();
| ------------ first mutable borrow occurs here
| ------- first mutable borrow occurs here
...
21 | let mut q2 = queries.q0();
| ^^^^^^^^^^^^ second mutable borrow occurs here
| ^^^^^^^ second mutable borrow occurs here
...
25 | b.0 = a.0
| --- first borrow later used here
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ error[E0499]: cannot borrow `queries` as mutable more than once at a time
--> tests/ui/system_query_set_iter_lifetime_safety.rs:11:14
|
7 | let mut q2 = queries.q0();
| ------------ first mutable borrow occurs here
| ------- first mutable borrow occurs here
...
11 | let q1 = queries.q1();
| ^^^^^^^^^^^^ second mutable borrow occurs here
| ^^^^^^^ second mutable borrow occurs here
...
16 | b.0 = a.0
| - first borrow later used here
Expand All @@ -14,10 +14,10 @@ error[E0499]: cannot borrow `queries` as mutable more than once at a time
--> tests/ui/system_query_set_iter_lifetime_safety.rs:24:18
|
20 | let q1 = queries.q1();
| ------------ first mutable borrow occurs here
| ------- first mutable borrow occurs here
...
24 | let mut q2 = queries.q0();
| ^^^^^^^^^^^^ second mutable borrow occurs here
| ^^^^^^^ second mutable borrow occurs here
...
29 | b.0 = a.0;
| --- first borrow later used here

0 comments on commit 6c7be3f

Please sign in to comment.