Skip to content
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

Rollup of 9 pull requests #100456

Merged
merged 26 commits into from
Aug 12, 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
127b6c4
cleanup code w/ pointers in std a little
WaffleLapkin Aug 1, 2022
a7c45ec
improve documentation of `pointer::align_offset`
WaffleLapkin Aug 1, 2022
be6bb56
add -Zextra-const-ub-checks to enable more UB checking in const-eval
RalfJung Aug 7, 2022
cc8259e
Adding more verbose documentation for `std::fmt::Write`
thedanvail Aug 8, 2022
7b2a5f2
dont rely on old macro-in-trait-impl bug
RalfJung Aug 9, 2022
2bd9479
compare with-flag to without-flag
RalfJung Aug 9, 2022
d52ed82
move an `assert!` to the right place
WaffleLapkin Aug 9, 2022
0436067
Merge branch 'rust-lang:master' into issue-98861-fix
thedanvail Aug 9, 2022
ee8a01f
Switching documentation to be more clear about potential errors
thedanvail Aug 9, 2022
2eebd34
errors: don't fail on broken primary translations
davidtwco Aug 10, 2022
3d21c37
std: optimize thread ID generation
joboet Aug 1, 2022
e1e25a8
Generalize trait object generic param check to aliases.
cjgillot Aug 7, 2022
0df84ae
Ban indirect references to `Self` too.
cjgillot Aug 7, 2022
98518c2
suggest const or static for global variable
chenyukang Aug 11, 2022
dd4613c
rustdoc: don't generate DOM element for operator
jsha Aug 11, 2022
e3c5bd6
let-else: add a test for warnings on let-else with diverging tail
cormacrelf Feb 15, 2022
9818526
Add regression test for #94176
est31 Jul 15, 2022
a8c799a
Rollup merge of #100022 - joboet:faster_threadid, r=joshtriplett
Dylan-DPC Aug 12, 2022
51eed00
Rollup merge of #100030 - WaffleLapkin:nice_pointer_sis, r=scottmcm
Dylan-DPC Aug 12, 2022
392ba5f
Rollup merge of #100229 - RalfJung:extra-const-ub-checks, r=lcnr
Dylan-DPC Aug 12, 2022
caac670
Rollup merge of #100247 - cjgillot:verify-dyn-trait-alias-defaults, r…
Dylan-DPC Aug 12, 2022
da3b89d
Rollup merge of #100255 - thedanvail:issue-98861-fix, r=joshtriplett
Dylan-DPC Aug 12, 2022
9e69dbc
Rollup merge of #100366 - davidtwco:translation-never-fail, r=compile…
Dylan-DPC Aug 12, 2022
9914c96
Rollup merge of #100396 - chenyukang:fix-100394, r=petrochenkov
Dylan-DPC Aug 12, 2022
0356034
Rollup merge of #100409 - jsha:highlight-lighter, r=GuillaumeGomez
Dylan-DPC Aug 12, 2022
3bc30bb
Rollup merge of #100443 - est31:let_else_regression_tests, r=Mark-Sim…
Dylan-DPC Aug 12, 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
Add regression test for #94176
  • Loading branch information
est31 committed Aug 12, 2022
commit 981852677c531d52f701b870bb27b45668a44d52
10 changes: 10 additions & 0 deletions src/test/ui/let-else/issue-94176.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Issue #94176: wrong span for the error message of a mismatched type error,
// if the function uses a `let else` construct.
#![feature(let_else)]

pub fn test(a: Option<u32>) -> Option<u32> { //~ ERROR mismatched types
let Some(_) = a else { return None; };
println!("Foo");
}

fn main() {}
19 changes: 19 additions & 0 deletions src/test/ui/let-else/issue-94176.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error[E0308]: mismatched types
--> $DIR/issue-94176.rs:5:32
|
LL | pub fn test(a: Option<u32>) -> Option<u32> {
| ---- ^^^^^^^^^^^ expected enum `Option`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
= note: expected enum `Option<u32>`
found unit type `()`
help: consider returning the local binding `a`
|
LL ~ println!("Foo");
LL + a
|

error: aborting due to previous error

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