8000 Rollup of 8 pull requests by matthiaskrgr · Pull Request #127454 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 8 pull requests #127454

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
Jul 7, 2024
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
69446e3
Print `TypeId` as hex for debugging
tgross35 Jun 30, 2024
23e5468
LinkedList's Cursor: method to get a ref to the cursor's list
GrigorenkoPV Jun 30, 2024
ba1ebc2
doc: update config file path in platform-support/wasm32-wasip1-thread…
iawia002 Jul 2, 2024
a737237
Add test case demonstrating equality of paths "foo/bar" and "foobar"
zanieb Jul 3, 2024
dd509c7
Add more test cases for path comparisons
zanieb Jul 3, 2024
f216834
stir the hash state a little to avoid prefix collisions
the8472 Jul 3, 2024
dd790ab
Remove some unnecessary integer conversions.
nnethercote Jul 4, 2024
ccd8dcc
Describe Sized requirements for mem::offset_of
nicholasbishop Jul 5, 2024
14b859f
Rename `Attribute::tokens` (the inherent method).
nnethercote Jul 3, 2024
88373e9
Remove an unnecessary local variable.
nnethercote Jul 3, 2024
b261501
Remove `HasSpan` trait.
nnethercote Jul 4, 2024
9d33a8f
Simplify `ReplaceRange`.
nnethercote Jul 4, 2024
3a5c4b6
Rename some attribute types for consistency.
nnethercote Jul 7, 2024
022582c
Remove `Clone` derive from `LazyAttrTokenStreamImpl`.
nnethercote Jul 7, 2024
9f16f1f
Add an size assertion.
nnethercote Jul 7, 2024
9e0aab7
Use `filter_map` instead of `flat_map` in `configure_tokens`.
nnethercote Jul 7, 2024
bee9120
once_lock: make test not take as long in Miri
RalfJung Jul 7, 2024
9da3638
Move a span_bug under a condition that cx is tainted
gurry Jul 7, 2024
35a1ca0
Rollup merge of #127179 - tgross35:typeid-debug-hex, r=Nilstrieb
matthiaskrgr Jul 7, 2024
94d07be
Rollup merge of #127189 - GrigorenkoPV:linkedlist-cursor-list, r=Nils…
matthiaskrgr Jul 7, 2024
d84d221
Rollup merge of #127236 - iawia002:wasip1-threads-doc, r=Nilstrieb
matthiaskrgr Jul 7, 2024
56557c4
Rollup merge of #127297 - the8472:path-new-hash, r=Nilstrieb
matthiaskrgr Jul 7, 2024
510020a
Rollup merge of #127308 - nnethercote:Attribute-cleanups, r=petrochenkov
matthiaskrgr Jul 7, 2024
c40530d
Rollup merge of #127354 - nicholasbishop:bishop-sized-doc, r=Nilstrieb
matthiaskrgr Jul 7, 2024
1ee6345
Rollup merge of #127409 - gurry:127332-ice-with-expr-not-struct, r=ol…
matthiaskrgr Jul 7, 2024
b564c51
Rollup merge of #127447 - RalfJung:once_lock_miri, r=joboet
matthiaskrgr Jul 7, 2024
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
Move a span_bug under a condition that cx is tainted
Fixes an ICE caused when a with expression is not a struct
  • Loading branch information
gurry committed Jul 7, 2024
commit 9da3638c6a90748cc913a3e2e02a74eb851ec48a
4 changes: 3 additions & 1 deletion compiler/rustc_hir_typeck/src/expr_use_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,9 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
// struct; however, when EUV is run during typeck, it
// may not. This will generate an error earlier in typeck,
// so we can just ignore it.
span_bug!(with_expr.span, "with expression doesn't evaluate to a struct");
if self.cx.tainted_by_errors().is_ok() {
span_bug!(with_expr.span, "with expression doesn't evaluate to a struct");
}
}
}

Expand Down
9 changes: 0 additions & 9 deletions tests/crashes/127332.rs

This file was deleted.

15 changes: 15 additions & 0 deletions tests/ui/typeck/ice-with-expr-not-struct-127332.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Regression test for ICE #127332

// Tests that we do not ICE when a with expr is
// not a struct but something else like an enum

fn main() {
let x = || {
enum Foo {
A { x: u32 },
}
let orig = Foo::A { x: 5 };
Foo::A { x: 6, ..orig };
//~^ ERROR functional record update syntax requires a struct
};
}
9 changes: 9 additions & 0 deletions tests/ui/typeck/ice-with-expr-not-struct-127332.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0436]: functional record update syntax requires a struct
--> $DIR/ice-with-expr-not-struct-127332.rs:12:26
|
LL | Foo::A { x: 6, ..orig };
| ^^^^

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0436`.
Loading
0