Skip to content

Commit c77cf40

Browse files
authored
Rollup merge of #108401 - notriddle:notriddle/diagnostics-article, r=compiler-errors
diagnostics: remove inconsistent English article "this" from E0107 Consider [`tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`][issue-102768.stderr], the error message where it gives additional notes about where the associated type is defined, and how the dead code lint doesn't have an article, like in [`tests/ui/lint/dead-code/issue-85255.stderr`][issue-85255.stderr]. They don't have articles, so it seems unnecessary to have one here. [issue-102768.stderr]: https://github.com/rust-lang/rust/blob/07c993eba8b76eae497e98433ae075b00f01be10/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr [issue-85255.stderr]: https://github.com/rust-lang/rust/blob/07c993eba8b76eae497e98433ae075b00f01be10/tests/ui/lint/dead-code/issue-85255.stderr
2 parents 353827a + 0241e49 commit c77cf40

File tree

112 files changed

+340
-340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+340
-340
lines changed

compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
462462

463463
if self.gen_args.span_ext().is_some() {
464464
format!(
465-
"this {} takes {}{} {} argument{} but {} {} supplied",
465+
"{} takes {}{} {} argument{} but {} {} supplied",
466466
def_kind,
467467
quantifier,
468468
bound,

tests/rustdoc-ui/unable-fulfill-trait.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
1+
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
22
--> $DIR/unable-fulfill-trait.rs:4:17
33
|
44
LL | field1: dyn Bar<'a, 'b,>,

tests/ui/argument-suggestions/issue-100154.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0107]: this function takes 0 generic arguments but 1 generic argument was supplied
1+
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
22
--> $DIR/issue-100154.rs:4:5
33
|
44
LL | foo::<()>(());

tests/ui/async-await/issues/issue-65159.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// edition:2018
44

55
async fn copy() -> Result<()>
6-
//~^ ERROR this enum takes 2 generic arguments
6+
//~^ ERROR enum takes 2 generic arguments
77
{
88
Ok(())
99
}

tests/ui/async-await/issues/issue-65159.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
1+
error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied
22
--> $DIR/issue-65159.rs:5:20
33
|
44
LL | async fn copy() -> Result<()>

tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ impl MarketMultiplier {
1414
}
1515

1616
async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
17-
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
18-
//~^^ ERROR this struct takes 1 generic argument but 0 generic arguments were supplied
17+
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied
18+
//~^^ ERROR struct takes 1 generic argument but 0 generic arguments were supplied
1919
LockedMarket(generator.lock().unwrap().buy())
2020
}
2121

tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
1+
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
22
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
33
|
44
LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
@@ -12,7 +12,7 @@ note: struct defined here, with 0 lifetime parameters
1212
LL | struct LockedMarket<T>(T);
1313
| ^^^^^^^^^^^^
1414

15-
error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
15+
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
1616
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
1717
|
1818
LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {

tests/ui/const-generics/generic_const_exprs/issue-102768.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ trait X {
77

88
const _: () = {
99
fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
10-
//~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
11-
//~| ERROR this associated type takes 0 generic arguments but 1 generic argument
10+
//~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
11+
//~| ERROR associated type takes 0 generic arguments but 1 generic argument
1212
};
1313

1414
fn main() {}

tests/ui/const-generics/generic_const_exprs/issue-102768.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
1+
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
22
--> $DIR/issue-102768.rs:9:30
33
|
44
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
@@ -14,7 +14,7 @@ help: add missing lifetime argument
1414
LL | fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
1515
| +++
1616

17-
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
17+
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
1818
--> $DIR/issue-102768.rs:9:30
1919
|
2020
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}

tests/ui/const-generics/generic_const_exprs/issue-76595.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
1+
error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied
22
--> $DIR/issue-76595.rs:15:5
33
|
44
LL | test::<2>();

0 commit comments

Comments
 (0)