forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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#91677 - matthiaskrgr:rollup-yiczced, r=matthi…
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#91245 (suggest casting between i/u32 and char) - rust-lang#91337 (Add a suggestion if `macro_rules` is misspelled) - rust-lang#91534 (Make rustdoc headings black, and markdown blue) - rust-lang#91637 (Add test for packed drops in generators) - rust-lang#91667 (Fix indent of itemTypes in search.js) Failed merges: - rust-lang#91568 (Pretty print break and continue without redundant space) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
16 changed files
with
215 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
fn foo<T>(_t: T) {} | ||
|
||
fn main() { | ||
foo::<u32>('0'); //~ ERROR | ||
foo::<i32>('0'); //~ ERROR | ||
foo::<u64>('0'); //~ ERROR | ||
foo::<i64>('0'); //~ ERROR | ||
foo::<char>(0u32); //~ ERROR | ||
} |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/cast-int-to-char.rs:4:16 | ||
| | ||
LL | foo::<u32>('0'); | ||
| ^^^ expected `u32`, found `char` | ||
| | ||
help: you can cast a `char` to a `u32`, since a `char` always occupies 4 bytes | ||
| | ||
LL | foo::<u32>('0' as u32); | ||
| ++++++ | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/cast-int-to-char.rs:5:16 | ||
| | ||
LL | foo::<i32>('0'); | ||
| ^^^ expected `i32`, found `char` | ||
| | ||
help: you can cast a `char` to an `i32`, since a `char` always occupies 4 bytes | ||
| | ||
LL | foo::<i32>('0' as i32); | ||
| ++++++ | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/cast-int-to-char.rs:6:16 | ||
| | ||
LL | foo::<u64>('0'); | ||
| ^^^ expected `u64`, found `char` | ||
| | ||
help: you can cast a `char` to a `u64`, since a `char` always occupies 4 bytes | ||
| | ||
LL | foo::<u64>('0' as u64); | ||
| ++++++ | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/cast-int-to-char.rs:7:16 | ||
| | ||
LL | foo::<i64>('0'); | ||
| ^^^ expected `i64`, found `char` | ||
| | ||
help: you can cast a `char` to an `i64`, since a `char` always occupies 4 bytes | ||
| | ||
LL | foo::<i64>('0' as i64); | ||
| ++++++ | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/cast-int-to-char.rs:8:17 | ||
| | ||
LL | foo::<char>(0u32); | ||
| ^^^^ expected `char`, found `u32` | ||
|
||
error: aborting due to 5 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Regression test for issue #91227. | ||
|
||
// run-rustfix | ||
|
||
#![allow(unused_macros)] | ||
|
||
macro_rules! thing { | ||
//~^ ERROR: expected one of | ||
//~| HELP: perhaps you meant to define a macro | ||
() => {} | ||
} | ||
|
||
fn main() {} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Regression test for issue #91227. | ||
|
||
// run-rustfix | ||
|
||
#![allow(unused_macros)] | ||
|
||
marco_rules! thing { | ||
//~^ ERROR: expected one of | ||
//~| HELP: perhaps you meant to define a macro | ||
() => {} | ||
} | ||
|
||
fn main() {} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: expected one of `(`, `[`, or `{`, found `thing` | ||
--> $DIR/misspelled-macro-rules.rs:7:14 | ||
| | ||
LL | marco_rules! thing { | ||
| ----------- ^^^^^ expected one of `(`, `[`, or `{` | ||
| | | ||
| help: perhaps you meant to define a macro: `macro_rules` | ||
|
||
error: aborting due to previous error | ||
|
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