Skip to content

Commit 96fb1b3

Browse files
committed
include outer_inclusive_binder of pattern types
1 parent 422f6bb commit 96fb1b3

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

compiler/rustc_type_ir/src/flags.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ impl<I: Interner> FlagComputation<I> {
347347

348348
fn add_ty_pat(&mut self, pat: <I as Interner>::Pat) {
349349
self.add_flags(pat.flags());
350+
self.add_exclusive_binder(pat.outer_exclusive_binder());
350351
}
351352

352353
fn add_predicate(&mut self, binder: ty::Binder<I, ty::PredicateKind<I>>) {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2+
--> $DIR/transmute.rs:23:14
3+
|
4+
LL | unsafe { std::mem::transmute(x) }
5+
| ^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: source type: `Option<(u32) is S..=E>` (size can vary because of u32)
8+
= note: target type: `u32` (32 bits)
9+
10+
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
11+
--> $DIR/transmute.rs:31:14
12+
|
13+
LL | unsafe { std::mem::transmute(x) }
14+
| ^^^^^^^^^^^^^^^^^^^
15+
|
16+
= note: source type: `Option<(u32) is S..=E>` (size can vary because of u32)
17+
= note: target type: `Option<u32>` (64 bits)
18+
19+
error: aborting due to 2 previous errors
20+
21+
For more information about this error, try `rustc --explain E0512`.

0 commit comments

Comments
 (0)