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#83692 - Dylan-DPC:rollup-2a2m3jy, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - rust-lang#80720 (Make documentation of which items the prelude exports more readable.) - rust-lang#83654 (Do not emit a suggestion that causes the E0632 error) - rust-lang#83671 (Add a regression test for issue-75801) - rust-lang#83678 (Fix Self keyword doc URL conflict on case insensitive file systems (until definitely fixed on rustdoc)) - rust-lang#83680 (Update for loop desugaring docs) - rust-lang#83683 (bootstrap: don't complain about linkcheck if it is excluded) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
9 changed files
with
153 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Regression test for #83606. | ||
|
||
fn foo<const N: usize>(_: impl std::fmt::Display) -> [usize; N] { | ||
[0; N] | ||
} | ||
|
||
fn main() { | ||
let _ = foo("foo"); //<- Do not suggest `foo::<N>("foo");`! | ||
//~^ ERROR: type annotations needed for `[usize; _]` | ||
} |
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,11 @@ | ||
error[E0282]: type annotations needed for `[usize; _]` | ||
--> $DIR/issue-83606.rs:8:13 | ||
| | ||
LL | let _ = foo("foo"); //<- Do not suggest `foo::<N>("foo");`! | ||
| - ^^^ cannot infer the value of const parameter `N` declared on the function `foo` | ||
| | | ||
| consider giving this pattern the explicit type `[usize; _]`, where the type parameter `N` is specified | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
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 @@ | ||
// force-host | ||
// no-prefer-dynamic | ||
|
||
#![crate_type = "proc-macro"] | ||
|
||
extern crate proc_macro; | ||
|
||
use proc_macro::TokenStream; | ||
|
||
#[proc_macro_attribute] | ||
pub fn foo(_args: TokenStream, item: TokenStream) -> TokenStream { | ||
item | ||
} |
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,19 @@ | ||
// aux-build: issue-75801.rs | ||
|
||
// Regression test for #75801. | ||
|
||
#[macro_use] | ||
extern crate issue_75801; | ||
|
||
macro_rules! foo { | ||
($arg:expr) => { | ||
#[foo] | ||
fn bar() { | ||
let _bar: u32 = $arg; | ||
} | ||
}; | ||
} | ||
|
||
foo!("baz"); //~ ERROR: mismatched types [E0308] | ||
|
||
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,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-75801.rs:17:6 | ||
| | ||
LL | let _bar: u32 = $arg; | ||
| --- expected due to this | ||
... | ||
LL | foo!("baz"); | ||
| ^^^^^ expected `u32`, found `&str` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |