Matthew Jasper
ea6fe08751
Split explain_why_borrow_contains_point into two functions
...
Allows callers to change other parts of their message based on the
explanation
2018-09-09 19:43:10 +01:00
Niko Matsakis
aa52e12658
add generalization
2018-09-09 14:31:05 -04:00
Niko Matsakis
5f43b099cd
instantiate traversed binders rather than saving the scopes
2018-09-09 14:14:41 -04:00
Niko Matsakis
39b9281562
add a first_free_index
parameter
2018-09-09 14:14:41 -04:00
Niko Matsakis
5c5741bf76
add some comments
2018-09-09 14:14:41 -04:00
Niko Matsakis
d6a98db7cb
factor out lookup_bound_region
2018-09-09 14:14:41 -04:00
Niko Matsakis
09f4172bed
remove extra lifetime bound
2018-09-09 14:14:41 -04:00
Niko Matsakis
fa1f564426
document the purpose of ScopeInstantiator
2018-09-09 14:14:41 -04:00
bors
b24330fb7d
Auto merge of #53705 - ms2300:tmp, r=oli-obk
...
#53576 Renaming TyAnon -> TyOpaque
Fixes #53576
2018-09-08 14:16:37 +00:00
kennytm
51c387931e
Rollup merge of #53315 - nikomatsakis:newtype-index, r=Mark-Simulacrum
...
use `NonZeroU32` in `newtype_index!`macro, change syntax
Various improvements to the `newtype_index!` macro:
- Use `NonZeroU32` so that `Option<T>` is cheap
- More ergonomic helper method, no need to import `Idx` trait all the time
- Improve syntax to use `struct` keyword so that ripgrep works to find type def'n
Fixes https://github.com/rust-lang/rust/issues/50337
I'm curious to see if this passes tests =)
2018-09-08 18:28:13 +08:00
Niko Matsakis
bb8c4c0db9
print less info to stabilize tests
2018-09-07 17:24:46 -04:00
Niko Matsakis
43e758798c
avoid propagating outlives obligations on locals if we can
2018-09-07 17:08:22 -04:00
Niko Matsakis
db169e53e5
move annotate
onto a method of UniversalRegions
...
This allows it to print out the "late-bound regions" from the closure
context more easily. Besides, all the state that is being printed it
is private to the `UniversalRegions`.
2018-09-07 17:08:21 -04:00
Niko Matsakis
b7f871363b
region_infer: rustfmt
2018-09-07 16:41:15 -04:00
Niko Matsakis
8eb789f4c7
region_infer.rs: add some debug!
2018-09-07 16:41:15 -04:00
Niko Matsakis
5aee959e9f
make field always private, add From
impls
2018-09-07 11:37:46 -04:00
Niko Matsakis
1242639b88
change syntax of newtype_index
to look like a struct decl
2018-09-07 11:34:41 -04:00
Niko Matsakis
81f64b7fa3
universal_regions.rs: rustfmt
2018-09-06 19:58:23 -04:00
Niko Matsakis
da12d02b37
useful debug in universal_regions
2018-09-06 19:58:23 -04:00
Niko Matsakis
bf6fe2a51e
region_name: rustfmt
2018-09-06 19:58:23 -04:00
Niko Matsakis
2eb76fc8a1
add a useful debug to give_region_a_name
2018-09-06 19:58:22 -04:00
Wesley Wiser
4e706f56bd
[nll] teach SCC about 'static
...
Fixes #53178
2018-09-06 19:58:22 -04:00
Wesley Wiser
db01b6789d
[nll] Refactor the Edges
iterator to return OutlivesConstraints
...
Part of #53178
2018-09-06 19:58:22 -04:00
bors
a8c11d216b
Auto merge of #53575 - matthewjasper:unsized-is-an-error, r=estebank
...
Don't reduce E0161 to a warning in NLL migrate mode
This error has been on stable for a while, and allowing such code cause the compile to later ICE (since we can't codegen it). Errors `box UNSIZED EXPR` with unsized locals because it's not compatible with the current evaluation order (create the box before evaluating the expressions).
cc #53469 (fixes the ICE in this case)
cc @qnighy
2018-09-06 21:02:35 +00:00
ms2300
6c14360c32
Changing TyAnon -> TyOpaque and relevant functions
2018-09-05 13:01:16 -06:00
Felix S. Klock II
8d231ec872
Fix definition of LocalUseMapBuild
so that it can build under stage0,
...
which does not have as many feature gates enabled.
2018-08-28 10:59:15 +02:00
Niko Matsakis
09feec6d5c
make to_location
O(1)
2018-08-27 13:57:55 -04:00
Niko Matsakis
7eec37b2f9
merge PointIndexMap
and RegionValueElements
2018-08-27 13:57:55 -04:00
Niko Matsakis
af3ff10c7d
improve comment on LiveVar
2018-08-27 13:57:55 -04:00
Niko Matsakis
94697ba4b6
rename LocalWithRegion
to LiveVar
2018-08-27 13:57:55 -04:00
Niko Matsakis
437485527e
comment what trace
does
2018-08-27 13:57:55 -04:00
Niko Matsakis
9394a99f8e
fix comment
2018-08-27 13:57:55 -04:00
Niko Matsakis
12f50a6e75
implement liveness tracing, remove old liveness system
2018-08-27 13:57:55 -04:00
Niko Matsakis
a13e4aea81
remove the liveness mode and simplify categorize
...
Less modes!
2018-08-27 13:48:40 -04:00
bors
8785e348ba
Auto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelix
...
fix NLL ICEs
Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here.
Also, use the type-op machinery for implied outlives bounds.
Fixes #53568
Fixes #52992
Fixes #53680
2018-08-27 14:44:13 +00:00
Niko Matsakis
fa787454c5
pacify the mercilous tidy: user-ty on rvalue assignments
2018-08-24 13:27:38 -04:00
Niko Matsakis
56506cfa25
support user-given types in adts
2018-08-24 13:27:38 -04:00
Niko Matsakis
5f1643d2ea
equate the user_ty
of a constant with its declared ty
2018-08-24 13:27:38 -04:00
bors
35bf1ae257
Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakis
...
Implement try block expressions
I noticed that `try` wasn't a keyword yet in Rust 2018, so...
~~Fixes https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135
cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
2018-08-23 11:46:24 +00:00
Niko Matsakis
a59584a6ff
use TypeOp
machinery for outlives_bounds
...
Fixes #52992
2018-08-23 07:38:47 -04:00
bors
e73077e106
Auto merge of #53520 - nnethercote:merge-IdxSet-IdxSetBuf, r=nikomatsakis
...
Merge `IdxSet` and `IdxSetBuf`
Because it simplifies things.
@r? nikomatsakis
2018-08-23 02:54:24 +00:00
Matthew Jasper
b83fe42237
Hard error for unsized values more often
...
* Sized checking in MIR should be a hard error in all borrowck modes
* box operands should be an error even with unsized locals
2018-08-22 21:36:10 +01:00
varkor
6f637da50c
Remove Ty prefix from Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22 16:07:44 +01:00
varkor
d37cee3b0e
Rename ty::TyVariants to ty::TyKind
2018-08-22 16:05:50 +01:00
varkor
87c7e57020
Rename ty::Slice to ty::List
2018-08-22 16:05:27 +01:00
kennytm
b5519db323
Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkor
...
Fix typos found by codespell.
2018-08-21 17:51:49 +08:00
Nicholas Nethercote
e7e9f2e699
Remove IdxSet typedef and Rename {,Hybrid}IdxSetBuf as {,Hybrid}IdxSet.
...
Now that the `Buf` vs. non-`Buf` distinction has been removed, it makes
sense to drop the `Buf` suffix and use the shorter names everywhere.
2018-08-20 14:00:51 +10:00
Scott McMurray
9e64ce1799
Parse try blocks with the try keyword instead of do catch placeholder
2018-08-19 16:53:05 -07:00
Donato Sciarra
062bfbf39b
mv codemap source_map
2018-08-19 23:01:01 +02:00
Donato Sciarra
d3fe97f3d3
mv codemap() source_map()
2018-08-19 23:01:01 +02:00