forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#106409 - matthiaskrgr:rollup-b58z1hz, r=matth…
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#104552 (warn newer available version of the x tool) - rust-lang#105681 (some fixes/improvements to mir::visit module) - rust-lang#106005 (Test the borrowck behavior of if-let guards) - rust-lang#106356 (clean: Remove `ctor_kind` from `VariantStruct`.) - rust-lang#106365 (Grammar : Missing "is" in format specifier diagnostic) - rust-lang#106388 (rustdoc: remove legacy box-sizing CSS) - rust-lang#106392 (`has_overflow` only if value is *not* within limit) - rust-lang#106402 (Fix dupe word typos) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
51 changed files
with
756 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,8 +76,6 @@ | |
} | ||
|
||
* { | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,37 @@ | ||
error[E0510]: cannot assign `x` in match guard | ||
--> $DIR/borrowck-mutate-in-guard.rs:10:25 | ||
--> $DIR/borrowck-mutate-in-guard.rs:12:25 | ||
| | ||
LL | match x { | ||
| - value is immutable in match guard | ||
LL | Enum::A(_) if { x = Enum::B(false); false } => 1, | ||
| ^^^^^^^^^^^^^^^^^^ cannot assign | ||
|
||
error[E0510]: cannot mutably borrow `x` in match guard | ||
--> $DIR/borrowck-mutate-in-guard.rs:12:33 | ||
--> $DIR/borrowck-mutate-in-guard.rs:14:33 | ||
| | ||
LL | match x { | ||
| - value is immutable in match guard | ||
... | ||
LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1, | ||
| ^^^^^^ cannot mutably borrow | ||
|
||
error: aborting due to 2 previous errors | ||
error[E0510]: cannot assign `x` in match guard | ||
--> $DIR/borrowck-mutate-in-guard.rs:25:40 | ||
| | ||
LL | match x { | ||
| - value is immutable in match guard | ||
LL | Enum::A(_) if let Some(()) = { x = Enum::B(false); None } => 1, | ||
| ^^^^^^^^^^^^^^^^^^ cannot assign | ||
|
||
error[E0510]: cannot mutably borrow `x` in match guard | ||
--> $DIR/borrowck-mutate-in-guard.rs:27:48 | ||
| | ||
LL | match x { | ||
| - value is immutable in match guard | ||
... | ||
LL | Enum::A(_) if let Some(()) = { let y = &mut x; *y = Enum::B(false); None } => 1, | ||
| ^^^^^^ cannot mutably borrow | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0510`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
#![feature(if_let_guard)] | ||
|
||
fn main() { | ||
let a = Some("...".to_owned()); | ||
let b = match a { | ||
Some(_) if { drop(a); false } => None, | ||
x => x, //~ ERROR use of moved value: `a` | ||
}; | ||
println!("{:?}", b); | ||
|
||
let a = Some("...".to_owned()); | ||
let b = match a { | ||
Some(_) if let Some(()) = { drop(a); None } => None, | ||
x => x, //~ ERROR use of moved value: `a` | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.