Skip to content

support ascription for patterns in NLL #53873

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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fa1f564
document the purpose of `ScopeInstantiator`
nikomatsakis Aug 28, 2018
09f4172
remove extra lifetime bound
nikomatsakis Aug 28, 2018
d6a98db
factor out `lookup_bound_region`
nikomatsakis Aug 29, 2018
5c5741b
add some comments
nikomatsakis Aug 29, 2018
3f60043
infer/mod.rs: rustfmt
nikomatsakis Aug 29, 2018
5c016f4
add ability to create region vars with explicit universe
nikomatsakis Aug 29, 2018
39b9281
add a `first_free_index` parameter
nikomatsakis Aug 31, 2018
5f43b09
instantiate traversed binders rather than saving the scopes
nikomatsakis Aug 31, 2018
aa52e12
add generalization
nikomatsakis Aug 31, 2018
07e21b1
add a test for variables used twice
nikomatsakis Aug 31, 2018
34575e6
now that we can handle subtyping, fix higher-ranked equality
nikomatsakis Aug 31, 2018
4b5f19a
remove the old `UserAssertTy` support
nikomatsakis Aug 31, 2018
50754d0
add a `AscribeUserType` pattern, largely ignored
nikomatsakis Aug 31, 2018
22f9bcc
matches/mod.rs: rustfmt
nikomatsakis Aug 31, 2018
dd3cc96
add the `AscribeUserType` statement kind
nikomatsakis Aug 31, 2018
7e1b978
insert `AscribeUserType` for ascriptions
nikomatsakis Aug 31, 2018
05a6e1e
pacify the mercilous tidy
nikomatsakis Sep 3, 2018
f0e3a09
fixup: rename `UserAssertTy` to `AscribeUserType`
nikomatsakis Sep 4, 2018
fced2b1
fix SCCs containing mixture of universes
nikomatsakis Sep 5, 2018
9c5e794
WIP remove incorrect nll.stderr reference files
nikomatsakis Sep 5, 2018
16f4e8a
generalize `AscribeUserType` to handle sub or super type
nikomatsakis Sep 5, 2018
2f6628e
optimize `let x: T = ..` to avoid a temporary
nikomatsakis Sep 5, 2018
a871053
expand the patterns test with a bunch more scenarios
nikomatsakis Sep 10, 2018
e87bf30
propagate user-ascribes types down onto resulting bindings
nikomatsakis Sep 10, 2018
2b6f966
add link to https://github.com/rust-lang/rust/issues/54105
nikomatsakis Sep 10, 2018
df37678
add FIXME related to `ref x` bindings
nikomatsakis Sep 10, 2018
f95f23f
fix incremental test
nikomatsakis Sep 10, 2018
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
6 changes: 4 additions & 2 deletions src/librustc/ich/impls_mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ impl_stable_hash_for!(enum mir::LocalKind { Var, Temp, Arg, ReturnPointer });
impl_stable_hash_for!(struct mir::LocalDecl<'tcx> {
mutability,
ty,
user_ty,
name,
source_info,
visibility_scope,
Expand Down Expand Up @@ -255,9 +256,10 @@ for mir::StatementKind<'gcx> {
op.hash_stable(hcx, hasher);
places.hash_stable(hcx, hasher);
}
mir::StatementKind::UserAssertTy(ref c_ty, ref local) => {
mir::StatementKind::AscribeUserType(ref place, ref variance, ref c_ty) => {
place.hash_stable(hcx, hasher);
variance.hash_stable(hcx, hasher);
c_ty.hash_stable(hcx, hasher);
local.hash_stable(hcx, hasher);
}
mir::StatementKind::Nop => {}
mir::StatementKind::InlineAsm { ref asm, ref outputs, ref inputs } => {
Expand Down
Loading