Skip to content

Rollup of 11 pull requests #96087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8c2353b
remove find_use_placement
kckeiks Mar 18, 2022
6b75406
Create 2024 edition
jhpratt Feb 28, 2022
7bd22e2
only downgrade Error -> Ambiguous if type error is in predicate
compiler-errors Apr 7, 2022
abf2b4c
Stabilize `derive_default_enum`
jhpratt Feb 28, 2022
a3dd654
Add documentation
jhpratt Mar 8, 2022
7c2d57e
couple of clippy::complexity fixes
matthiaskrgr Apr 13, 2022
21d3f84
test: add is_superset test cases for BTreeSet
Gumichocopengin8 Apr 14, 2022
50c339e
test: add remove() test cases for BTreeSet
Gumichocopengin8 Apr 14, 2022
7a35c0f
Use u32 instead of i32 for futexes.
m-ou-se Apr 14, 2022
75287dd
remove function param that is only used in recursive of fn inner()
matthiaskrgr Apr 13, 2022
15abc81
remove reudndant function param in check_matcher_core()
matthiaskrgr Apr 13, 2022
6511976
remove redundant function param in check_for_self_assign_helper()
matthiaskrgr Apr 13, 2022
c20bb1d
Update issue-92893.stderr
ouz-a Apr 14, 2022
5459e66
docs: Update tests chapter for Termination stabilization
ehuss Apr 14, 2022
f9188cc
use `format-args-capture` and remove unnecessary nested block
TaKO8Ki Apr 15, 2022
27e2d81
Rollup merge of #94457 - jhpratt:stabilize-derive_default_enum, r=dav…
Dylan-DPC Apr 15, 2022
20bf34f
Rollup merge of #94461 - jhpratt:2024-edition, r=pnkfelix
Dylan-DPC Apr 15, 2022
a32e0f3
Rollup merge of #94849 - ouz-a:master4, r=oli-obk
Dylan-DPC Apr 15, 2022
bdbf099
Rollup merge of #95194 - kckeiks:update-algo-in-find-use-placement, r…
Dylan-DPC Apr 15, 2022
7478294
Rollup merge of #95749 - compiler-errors:ambig, r=oli-obk
Dylan-DPC Apr 15, 2022
ba9c3a1
Rollup merge of #96026 - matthiaskrgr:clippy_compl_1304, r=Dylan-DPC
Dylan-DPC Apr 15, 2022
937b0a0
Rollup merge of #96027 - matthiaskrgr:clippy_rec, r=fee1-dead
Dylan-DPC Apr 15, 2022
224afad
Rollup merge of #96034 - Gumichocopengin8:test/btree-set, r=Dylan-DPC
Dylan-DPC Apr 15, 2022
aa978ad
Rollup merge of #96040 - m-ou-se:futex-u32, r=Amanieu
Dylan-DPC Apr 15, 2022
18a7ce3
Rollup merge of #96062 - ehuss:test-termination, r=Dylan-DPC
Dylan-DPC Apr 15, 2022
fa281fd
Rollup merge of #96065 - TaKO8Ki:use-`format-args-capture`-and-remove…
Dylan-DPC Apr 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
only downgrade Error -> Ambiguous if type error is in predicate
  • Loading branch information
compiler-errors committed Apr 7, 2022
commit 7bd22e29d0d604e594ba03b51bd8c3fc82959215
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// `Err(Unimplemented)` to `Ok(None)`. This helps us avoid
// emitting additional spurious errors, since we're guaranteed
// to have emitted at least one.
if stack.obligation.references_error() {
debug!("no results for error type, treating as ambiguous");
if stack.obligation.predicate.references_error() {
debug!(?stack.obligation.predicate, "found error type in predicate, treating as ambiguous");
return Ok(None);
}
return Err(Unimplemented);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ where
//~^ ERROR cannot find type `T` in this scope
//~| NOTE not found in this scope
{
// The part where it claims that there is no method named `len` is a bug. Feel free to fix it.
// This test is intended to ensure that a different bug, where it claimed
// that `v` was a function, does not regress.
fn method(v: Vec<u8>) { v.len(); }
//~^ ERROR type annotations needed
//~| NOTE cannot infer type
//~| NOTE type must be known at this point
//~| ERROR no method named `len`
//~| NOTE private field, not a method
}

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ error[E0412]: cannot find type `T` in this scope
LL | T: Copy,
| ^ not found in this scope

error[E0282]: type annotations needed
--> $DIR/fn-help-with-err-generic-is-not-function.rs:14:31
|
LL | fn method(v: Vec<u8>) { v.len(); }
| ^^^ cannot infer type
|
= note: type must be known at this point

error[E0599]: no method named `len` found for struct `Vec<u8>` in the current scope
--> $DIR/fn-help-with-err-generic-is-not-function.rs:14:31
|
LL | fn method(v: Vec<u8>) { v.len(); }
| ^^^ private field, not a method

error: aborting due to 4 previous errors
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0282, E0412, E0599.
For more information about an error, try `rustc --explain E0282`.
For more information about this error, try `rustc --explain E0412`.
9 changes: 9 additions & 0 deletions src/test/ui/typeck/autoderef-with-param-env-error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fn foo()
where
T: Send,
//~^ cannot find type `T` in this scope
{
let s = "abc".to_string();
}

fn main() {}
12 changes: 12 additions & 0 deletions src/test/ui/typeck/autoderef-with-param-env-error.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
error[E0412]: cannot find type `T` in this scope
--> $DIR/autoderef-with-param-env-error.rs:3:5
|
LL | fn foo()
| - help: you might be missing a type parameter: `<T>`
LL | where
LL | T: Send,
| ^ not found in this scope

error: aborting due to previous error

For more information about this error, try `rustc --explain E0412`.