Auto merge of #61460 - Centril:rollup-8txhjx4, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #61380 (Fix some issues with `unwrap_usize` instead of `assert_usize`)
 - #61423 (codegen: change `$6d$` to `$u6d$`)
 - #61438 (Point at individual type args on arg count mismatch)
 - #61441 (Tweak wording when encountering `fn` call in pattern)
 - #61451 (Fix missing semicolon in doc)
 - #61458 (Fix typo in AsRef doc)

Failed merges:

r? @ghost
This commit is contained in:
bors 2019-06-02 14:42:11 +00:00
commit d461555e44
33 changed files with 313 additions and 92 deletions

View file

@ -1,8 +1,8 @@
error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
--> $DIR/issue-36708.rs:8:11
--> $DIR/issue-36708.rs:8:12
|
LL | fn foo<T>() {}
| ^^^ found 1 type parameter, expected 0
| ^ found 1 type parameter, expected 0
error: aborting due to previous error

View file

@ -2,7 +2,9 @@ error[E0164]: expected tuple struct/variant, found method `<Path>::new`
--> $DIR/issue-55587.rs:4:9
|
LL | let Path::new();
| ^^^^^^^^^^^ not a tuple variant or struct
| ^^^^^^^^^^^ `fn` calls are not allowed in patterns
|
= help: for more information, visit https://doc.rust-lang.org/book/ch18-00-patterns.html
error: aborting due to previous error

View file

@ -10,6 +10,7 @@ impl Foo for u32 {
fn foo(&self, t: impl Clone) {}
//~^ ERROR method `foo` has 1 type parameter but its trait declaration has 0 type parameters
//~| NOTE found 1 type parameter
//~| NOTE `impl Trait` introduces an implicit type parameter
}
fn main() {}

View file

@ -1,11 +1,14 @@
error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0 type parameters
--> $DIR/type-arg-mismatch-due-to-impl-trait.rs:10:5
--> $DIR/type-arg-mismatch-due-to-impl-trait.rs:10:22
|
LL | fn foo(&self, t: Self::T);
| -------------------------- expected 0 type parameters
| - expected 0 type parameters
...
LL | fn foo(&self, t: impl Clone) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found 1 type parameter
| ^^^^^^^^^^
| |
| found 1 type parameter
| `impl Trait` introduces an implicit type parameter
error: aborting due to previous error