bors
140936307e
Auto merge of #57282 - matthewjasper:wellformed-return-ty, r=nikomatsakis
...
Wf-check the output type of a function in MIR-typeck
Closes #57265
cc @scalexm
2019-01-03 03:48:12 +00:00
Niko Matsakis
8e89184a7b
rename type_moves_by_default
to type_is_copy_modulo_regions
2019-01-02 17:35:06 -05:00
Niko Matsakis
4c8fd2e80a
try to detect affected code and direct people to #56105
2019-01-02 17:35:06 -05:00
Niko Matsakis
2c17af0bf7
track if any region constraints involved placeholders
2019-01-02 17:35:06 -05:00
Niko Matsakis
13ea9b877c
pacify the mercilous eddyb ;)
2019-01-02 17:35:06 -05:00
Niko Matsakis
c04563e1b0
add some comments about lifetimes etc
2019-01-02 17:35:06 -05:00
Niko Matsakis
1db7193162
address tmandry nits
2019-01-02 17:35:06 -05:00
Niko Matsakis
cf2f7cccb4
pacify the mercilous tidy
2019-01-02 17:35:06 -05:00
Niko Matsakis
bc4404c0b5
improve handling for subtype
...
Still not great, but good enough to land this PR.
2019-01-02 17:35:06 -05:00
Niko Matsakis
a24e04dff6
say "the lifetime" instead of "some lifetime" when it feels right
...
In particular, when we want to indicate that there is a connection
between the self type and the other types.
2019-01-02 17:35:06 -05:00
Niko Matsakis
7bc3f5585a
apply the same logic to ConcreteFailure errors
2019-01-02 17:35:06 -05:00
Niko Matsakis
77924de4a6
refactor highlighting to take any RegionKind, making it more general
2019-01-02 17:35:06 -05:00
Niko Matsakis
6cbbee1dc7
apply the new placeholder errors even with just one placeholder
2019-01-02 17:35:06 -05:00
Niko Matsakis
0a61d682a1
introduce placeholder-placeholder errors for trait matching
2019-01-02 17:35:06 -05:00
Niko Matsakis
1597f2a0fc
add the ability to highlight placeholders
2019-01-02 17:35:05 -05:00
Niko Matsakis
37b0b3e9a3
generalize region highlights into a struct
2019-01-02 17:35:05 -05:00
Niko Matsakis
6a6d2f4b3f
dump out the exact state in error reporting debugs
2019-01-02 17:35:05 -05:00
Niko Matsakis
995192a472
make get_highlight_region_for_regionvid
only affect re-vid
...
In NLL, ReVid is all there is, but I might want to repurpose.
2019-01-02 17:35:05 -05:00
Niko Matsakis
0b03b9bbcf
remove outdated rustc_driver
tests
...
they are subsumed by `hr-subtype/hr-subtype.rs` and other tests
2019-01-02 17:35:05 -05:00
Niko Matsakis
a2d917989c
WIP other test changes
2019-01-02 17:35:05 -05:00
Niko Matsakis
c8e0a90dfc
tests: cases where we now do the right thing but did not before
...
Fixes #33684
2019-01-02 17:35:05 -05:00
Niko Matsakis
d3c96ff152
tests: worse diagnostics, but basically same errors
2019-01-02 17:35:05 -05:00
Niko Matsakis
78705b5ec7
tests: move coherence-subtyping from run-pass to compile-fail
...
This is the pattern we no longer accept.
2019-01-02 17:35:05 -05:00
Niko Matsakis
652fd2efdf
add tests exercising exists<'a> { forall<'b> { .. } }
pattern
...
Amazingly, this scenario was not tested for trait matching.
2019-01-02 17:35:05 -05:00
Niko Matsakis
b68fad670b
universe transition
...
Remove the leak-check and its associated machinery. Replace with
making the solver aware of universes.
2019-01-02 17:35:05 -05:00
Niko Matsakis
eba2ae526b
WIP: wfcheck ability to detect
2019-01-02 17:35:05 -05:00
Niko Matsakis
904a0bde93
select.rs: unsizing coercion should use a subtype
...
When we coerce `dyn Foo` to `dyn Bar`, that is OK as long as `Foo` is
usable in all contexts where `Bar` is usable (hence using the source
must be a subtype of the target).
This is needed for the universe-based code to handle
`old-lub-glb-object`; that test used to work sort of by accident
before with the old code.
2019-01-02 17:35:05 -05:00
Niko Matsakis
4170829e53
introduce ability to detect region constraints from snapshot
2019-01-02 17:35:05 -05:00
Niko Matsakis
4b5f274f90
make evaluation track whether outlives relationships mattered
...
Previously, evaluation ignored outlives relationships. Since we using
evaluation to skip the "normal" trait selection (which enforces
outlives relationships) this led to incorrect results in some cases.
2019-01-02 17:35:05 -05:00
Niko Matsakis
79efed84a0
remove wrapper functions that had no purpose
2019-01-02 17:35:05 -05:00
Niko Matsakis
5f0fe8f093
remove commit_if_ok
wrapper
2019-01-02 17:35:04 -05:00
Matthew Jasper
8ca83e915e
Add missing 'static bound for the Machine trait
2019-01-02 21:28:08 +00:00
Matthew Jasper
5dfc5f205c
Wf-check the output type of a function in MIR-typeck
2019-01-02 20:00:56 +00:00
Niko Matsakis
826fb1dbbb
adopt polonius-engine 0.6.2
...
Also datafrog 2.0.1, which works around a rustdoc bug
2019-01-02 14:45:30 -05:00
Niko Matsakis
5efcff11a4
generate invalidations from 2-phase-borrow activations
2019-01-02 14:44:25 -05:00
Andy Russell
0a6fb84738
make panictry!
private to libsyntax
...
This commit completely removes usage of the `panictry!` macro from
outside libsyntax. The macro causes parse errors to be fatal, so using
it in libsyntax_ext caused parse failures *within* a syntax extension to
be fatal, which is probably not intended.
Furthermore, this commit adds spans to diagnostics emitted by empty
extensions if they were missing, à la #56491 .
2019-01-02 11:02:30 -05:00
bors
ec194646fe
Auto merge of #57243 - dingelish:master, r=sfackler
...
Bound sgx target_env with fortanix as target_vendor
This PR adds `target_vendor` check, as discussed in issue [57231](https://github.com/rust-lang/rust/issues/57231 )
Signed-off-by: Yu Ding <dingelish@gmail.com>
2019-01-02 15:09:41 +00:00
bors
a36b960df6
Auto merge of #57250 - codeworm96:tyerr_msg, r=varkor
...
Improve type mismatch error messages
Closes #56115 .
Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.
TODO the book and clippy needs to be changed accordingly later.
r? @varkor
2019-01-02 11:59:15 +00:00
bors
d3704932bd
Auto merge of #57251 - petrochenkov:reregr, r=varkor
...
syntax: Fix regression in diagnostics for patterns in trait method parameters
Fixes https://github.com/rust-lang/rust/issues/55036
2019-01-02 09:24:10 +00:00
bors
96530344ef
Auto merge of #56827 - faern:eliminate-recv-timeout-panic, r=KodrAus
...
Eliminate Receiver::recv_timeout panic
Fixes #54552 .
This panic is because `recv_timeout` uses `Instant::now() + timeout` internally. This possible panic is not mentioned in the documentation for this method.
Very recently we merged (still unstable) support for checked addition (#56490 ) of `Instant + Duration`, so it's now finally possible to add these together without risking a panic.
2019-01-02 02:03:15 +00:00
bors
443ae75eaf
Auto merge of #57209 - estebank:suggest-raw-ident, r=petrochenkov
...
Suggest using raw identifiers in 2018 edition when using keywords
2019-01-01 23:30:34 +00:00
Yu Ding
20e0395e66
Merge remote-tracking branch 'upstream/master'
2019-01-01 14:55:33 -08:00
Vadim Petrochenkov
3df500db29
syntax: Fix regression in diagnostics for patterns in trait method parameters
2019-01-01 23:59:32 +03:00
bors
b2b7a063af
Auto merge of #57125 - doitian:inconsistent-clone-doc, r=bluss
...
Fix inconsistent Clone documentation.
Now, arrays of any size Clone if the element type is Clone. So remove the
the document that uses this as an example.
refs #57123
2019-01-01 20:50:13 +00:00
Yu Ding
a3128116d2
Remove min_const_unsafe_fn since it is stable
...
Signed-off-by: Yu Ding <dingelish@gmail.com>
2019-01-01 11:49:54 -08:00
Oliver Scherer
03b892860d
Check the correct arena
2019-01-01 20:06:50 +01:00
Oliver Scherer
9654ae9c99
Remove unused function
2019-01-01 20:06:50 +01:00
Oliver Scherer
72bcf92e12
Macrofy more Lift
impls
2019-01-01 20:06:50 +01:00
Oliver Scherer
e42b21b522
Properly lift Allocations
2019-01-01 20:05:48 +01:00
Oliver Scherer
48aa81911c
what is going on?
2019-01-01 20:05:03 +01:00