Auto merge of #89211 - workingjubilee:rollup-fj4eduk, r=workingjubilee
Rollup of 7 pull requests Successful merges: - #88612 (Add a better error message for #39364) - #89023 (Resolve issue : Somewhat confusing error with extended_key_value_attributes) - #89148 (Suggest `_` in turbofish if param will be inferred from fn argument) - #89171 (Run `no_core` rustdoc tests only on Linux) - #89176 (Change singular to plural) - #89184 (Temporarily rename int_roundings functions to avoid conflicts) - #89200 (Fix typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
293b8f2c11
16 changed files with 146 additions and 54 deletions
8
src/test/ui/attributes/extented-attribute-macro-error.rs
Normal file
8
src/test/ui/attributes/extented-attribute-macro-error.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// normalize-stderr-test: "couldn't read.*" -> "couldn't read the file"
|
||||
|
||||
#![feature(extended_key_value_attributes)]
|
||||
#![doc = include_str!("../not_existing_file.md")]
|
||||
struct Documented {}
|
||||
//~^^ ERROR couldn't read
|
||||
|
||||
fn main() {}
|
||||
10
src/test/ui/attributes/extented-attribute-macro-error.stderr
Normal file
10
src/test/ui/attributes/extented-attribute-macro-error.stderr
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
error: couldn't read the file
|
||||
--> $DIR/extented-attribute-macro-error.rs:4:10
|
||||
|
|
||||
LL | #![doc = include_str!("../not_existing_file.md")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// run-rustfix
|
||||
|
||||
fn two_type_params<A, B>(_: B) {}
|
||||
|
||||
fn main() {
|
||||
two_type_params::<String, _>(100); //~ ERROR this function takes 2 generic arguments
|
||||
two_type_params::<String, _>(100);
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// run-rustfix
|
||||
|
||||
fn two_type_params<A, B>(_: B) {}
|
||||
|
||||
fn main() {
|
||||
two_type_params::<String>(100); //~ ERROR this function takes 2 generic arguments
|
||||
two_type_params::<String, _>(100);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/missing-type-param-used-in-param.rs:6:5
|
||||
|
|
||||
LL | two_type_params::<String>(100);
|
||||
| ^^^^^^^^^^^^^^^ ------ supplied 1 generic argument
|
||||
| |
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: function defined here, with 2 generic parameters: `A`, `B`
|
||||
--> $DIR/missing-type-param-used-in-param.rs:3:4
|
||||
|
|
||||
LL | fn two_type_params<A, B>(_: B) {}
|
||||
| ^^^^^^^^^^^^^^^ - -
|
||||
help: add missing generic argument
|
||||
|
|
||||
LL | two_type_params::<String, _>(100);
|
||||
| +++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0107`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue