Skip to content

Commit 3cdd7ae

Browse files
committed
review comment
1 parent 319dd6f commit 3cdd7ae

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

src/librustc_typeck/check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,7 @@ fn bounds_from_generic_predicates(
22082208
for projection in &projections {
22092209
let p = projection.skip_binder();
22102210
// FIXME: this is not currently supported syntax, we should be looking at the `types` and
2211-
// insert the associated types where they correspond, but for now lets be "lazy" and
2211+
// insert the associated types where they correspond, but for now let's be "lazy" and
22122212
// propose this instead of the following valid resugaring:
22132213
// `T: Trait, Trait::Assoc = K` → `T: Trait<Assoc = K>`
22142214
where_clauses.push(format!("{} = {}", tcx.def_path_str(p.projection_ty.item_def_id), p.ty));
@@ -2265,7 +2265,7 @@ fn fn_sig_suggestion(
22652265
// fill in a significant portion of the missing code, and other subsequent
22662266
// suggestions can help the user fix the code.
22672267
format!(
2268-
"{}fn {}{}({}){}{} {{ unimplemented!() }}",
2268+
"{}fn {}{}({}){}{} {{ todo!() }}",
22692269
unsafety, ident, generics, args, output, where_clauses
22702270
)
22712271
}

src/test/ui/impl-trait/trait_type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ error[E0046]: not all trait items implemented, missing: `fmt`
2929
LL | impl std::fmt::Display for MyType4 {}
3030
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
3131
|
32-
= help: implement the missing item: `fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { unimplemented!() }`
32+
= help: implement the missing item: `fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }`
3333

3434
error: aborting due to 4 previous errors
3535

src/test/ui/issues/issue-3344.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0046]: not all trait items implemented, missing: `partial_cmp`
44
LL | impl PartialOrd for Thing {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `partial_cmp` in implementation
66
|
7-
= help: implement the missing item: `fn partial_cmp(&self, _: &Rhs) -> std::option::Option<std::cmp::Ordering> { unimplemented!() }`
7+
= help: implement the missing item: `fn partial_cmp(&self, _: &Rhs) -> std::option::Option<std::cmp::Ordering> { todo!() }`
88

99
error: aborting due to previous error
1010

src/test/ui/missing/missing-items/m2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | impl m1::X for X {
66
|
77
= help: implement the missing item: `const CONSTANT: u32 = 42;`
88
= help: implement the missing item: `type Type = Type;`
9-
= help: implement the missing item: `fn method(&self, _: std::string::String) -> <Self as m1::X>::Type { unimplemented!() }`
9+
= help: implement the missing item: `fn method(&self, _: std::string::String) -> <Self as m1::X>::Type { todo!() }`
1010

1111
error: aborting due to previous error
1212

src/test/ui/span/impl-wrong-item-for-trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ error[E0046]: not all trait items implemented, missing: `fmt`
6464
LL | impl Debug for FooTypeForMethod {
6565
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation
6666
|
67-
= help: implement the missing item: `fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { unimplemented!() }`
67+
= help: implement the missing item: `fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }`
6868

6969
error: aborting due to 8 previous errors
7070

src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ struct S;
1313
struct Type;
1414

1515
impl TraitA<()> for S { //~ ERROR not all trait items implemented
16-
fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: std::marker::Copy { unimplemented!() }
17-
fn bar<T>(_: T) -> Self { unimplemented!() }
16+
fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: std::marker::Copy { todo!() }
17+
fn bar<T>(_: T) -> Self { todo!() }
1818
type Type = Type;
1919
}
2020

src/test/ui/suggestions/missing-assoc-fn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ error[E0046]: not all trait items implemented, missing: `from_iter`
2828
LL | impl FromIterator<()> for X {
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `from_iter` in implementation
3030
|
31-
= help: implement the missing item: `fn from_iter<T>(_: T) -> Self where T: std::iter::IntoIterator, std::iter::IntoIterator::Item = A { unimplemented!() }`
31+
= help: implement the missing item: `fn from_iter<T>(_: T) -> Self where T: std::iter::IntoIterator, std::iter::IntoIterator::Item = A { todo!() }`
3232

3333
error: aborting due to 3 previous errors
3434

src/test/ui/suggestions/missing-trait-item.fixed

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ trait T {
77

88
mod foo {
99
use super::T;
10-
impl T for () { fn bar(&self, _: &usize, _: &usize) -> usize { unimplemented!() }
11-
unsafe fn foo(_: &usize, _: &usize) -> usize { unimplemented!() }
10+
impl T for () { fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
11+
unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
1212
} //~ ERROR not all trait items
1313

1414
impl T for usize { //~ ERROR not all trait items
15-
fn bar(&self, _: &usize, _: &usize) -> usize { unimplemented!() }
16-
unsafe fn foo(_: &usize, _: &usize) -> usize { unimplemented!() }
15+
fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
16+
unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
1717
}
1818
}
1919

0 commit comments

Comments
 (0)