Skip to content

Rollup of 7 pull requests #91505

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 20 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
29403ee
add unchecked downcast methods
ibraheemdev Nov 13, 2021
6f98293
add tracking issue for `downcast_unchecked`
ibraheemdev Nov 13, 2021
25271a5
fix doc links for `downcast_unchecked`
ibraheemdev Nov 20, 2021
f6b499d
Suggest the `pat_param` specifier before `|` on 2021 edition
ecstatic-morse Nov 30, 2021
4c1d317
Bless tests with new suggestion
ecstatic-morse Nov 30, 2021
bfd95e1
Bless duplicate test
ecstatic-morse Nov 30, 2021
e2846a7
Implement `@snapshot` check for htmldocck
camelid Nov 25, 2021
fe88fcf
Migrate a test to use `@snapshot`
camelid Nov 25, 2021
5b5df0f
Remove incorrect newline from float cast suggestion
estebank Dec 3, 2021
bdc4b46
Use let_else in some more places in rustc_lint
est31 Dec 3, 2021
7c108ab
Fix ICE when yielding in fn returning impl Trait
compiler-errors Dec 3, 2021
9931782
Document how recursion is handled for `ty::Ty`
camelid Nov 3, 2021
4ec5cdc
fix stability annotations for `Box::downcast`
ibraheemdev Dec 3, 2021
f99cd40
Rollup merge of #90538 - camelid:doc-recur-ty, r=estebank
matthiaskrgr Dec 4, 2021
0bd4ee7
Rollup merge of #90851 - ibraheemdev:downcast-unchecked, r=scottmcm
matthiaskrgr Dec 4, 2021
420ddd0
Rollup merge of #91209 - camelid:snapshot, r=jyn514
matthiaskrgr Dec 4, 2021
2b64476
Rollup merge of #91385 - ecstatic-morse:pat-param-spec-suggest, r=est…
matthiaskrgr Dec 4, 2021
f9587b6
Rollup merge of #91478 - estebank:fix-newline-in-cast-suggestion, r=c…
matthiaskrgr Dec 4, 2021
af546db
Rollup merge of #91481 - est31:let_else, r=jackh726
matthiaskrgr Dec 4, 2021
df51bff
Rollup merge of #91488 - compiler-errors:issue-91477, r=estebank
matthiaskrgr Dec 4, 2021
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
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/demand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// Missing try_into implementation for `{integer}` to `{float}`
err.multipart_suggestion_verbose(
&format!(
"{}, producing the floating point representation of the integer,
"{}, producing the floating point representation of the integer, \
rounded if necessary",
cast_msg,
),
Expand Down
20 changes: 10 additions & 10 deletions src/test/ui/numeric/numeric-cast.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,8 @@ error[E0308]: mismatched types
LL | foo::<f64>(x_usize);
| ^^^^^^^ expected `f64`, found `usize`
|
help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f64>(x_usize as f64);
| ++++++

Expand All @@ -1005,8 +1005,8 @@ error[E0308]: mismatched types
LL | foo::<f64>(x_u64);
| ^^^^^ expected `f64`, found `u64`
|
help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f64>(x_u64 as f64);
| ++++++

Expand Down Expand Up @@ -1115,8 +1115,8 @@ error[E0308]: mismatched types
LL | foo::<f32>(x_usize);
| ^^^^^^^ expected `f32`, found `usize`
|
help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_usize as f32);
| ++++++

Expand All @@ -1126,8 +1126,8 @@ error[E0308]: mismatched types
LL | foo::<f32>(x_u64);
| ^^^^^ expected `f32`, found `u64`
|
help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_u64 as f32);
| ++++++

Expand All @@ -1137,8 +1137,8 @@ error[E0308]: mismatched types
LL | foo::<f32>(x_u32);
| ^^^^^ expected `f32`, found `u32`
|
help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_u32 as f32);
| ++++++

Expand Down