Commit Graph

77328 Commits

Author SHA1 Message Date
John Kåre Alsaker
987631d3ba Move query functions out from the define_maps! macro 2018-04-27 12:09:59 +02:00
John Kåre Alsaker
4036d2be8a Create a job immediately when looking in the query map and start it later 2018-04-27 12:09:58 +02:00
bors
9822b5709c Auto merge of #49891 - cuviper:compiletest-crash, r=alexcrichton
compiletest: detect non-ICE compiler panics

Fixes #49888, but will be blocked by revealing #49889.
2018-04-27 07:43:46 +00:00
bors
8a09bc6a77 Auto merge of #48995 - aravind-pg:canonical-query, r=nikomatsakis
Create a canonical trait query for `evaluate_obligation`

This builds on the canonical query machinery introduced in #48411 to introduce a new canonical trait query for `evaluate_obligation` in the trait selector. Also ports most callers of the original `evaluate_obligation` to the new system (except in coherence, which requires support for intercrate mode). Closes #48537.

r? @nikomatsakis
2018-04-27 03:53:39 +00:00
bors
e05b78daa6 Auto merge of #49420 - nox:enum-scalarpair, r=eddyb
Use ScalarPair for tagged enums
2018-04-27 01:30:10 +00:00
Aravind Gollakota
e423dcc713 Update a compile-fail test 2018-04-26 20:28:30 -05:00
Aravind Gollakota
d5b2e90744 Retry canonical trait query in standard mode if overflow occurs
This is slightly hacky and hopefully only a somewhat temporary solution.
2018-04-26 20:28:30 -05:00
Aravind Gollakota
5cb0372160 Remove the stored obligation in OverflowError to simplify things
We will shortly refactor things so that it is no longer needed
2018-04-26 20:28:30 -05:00
Aravind Gollakota
e5535fc7dd Introduce trait query mode and use it to set overflow error handling policy in traits::select 2018-04-26 20:28:30 -05:00
Aravind Gollakota
3dd26b8a3e Simplify trait selector's evaluation API slightly 2018-04-26 20:28:30 -05:00
Aravind Gollakota
bc16b8e92a Port existing callers of evaluate_obligation to the new canonical trait query
Except the one in coherence, which needs support for intercrate mode.
2018-04-26 20:28:30 -05:00
Aravind Gollakota
3ab3a9f509 Create a canonical trait query for evaluate_obligation 2018-04-26 20:28:29 -05:00
Aravind Gollakota
79f71f976a Refactor overflow handling in traits::select to propagate overflow instead of aborting eagerly
We store the obligation that caused the overflow as part of the OverflowError, and report it at the public API endpoints (rather than in the implementation internals).
2018-04-26 20:26:20 -05:00
bors
7d8f0e22f5 Auto merge of #50253 - nikomatsakis:regressions-2018-04-26, r=eddyb
drop elaboration should reveal all

This used to happen implicitly through the normalization function; but we now keep the param-env as is, which seems less surprising.

cc #49685

r? @eddyb
2018-04-26 23:11:39 +00:00
bors
7f3444e1ba Auto merge of #49513 - nox:univariant-fieldless-enum-as-zst, r=eddyb
Treat repr(Rust) univariant fieldless enums as ZSTs

This makes all those enums be represented the same way:

```rust
enum A1 { B1 }
enum A2 { B2 = 0 }
enum A3 { B3, C3(!) }
```

Related to #15747.

Cc @rust-lang/wg-codegen @rust-lang/lang
2018-04-26 18:26:03 +00:00
Niko Matsakis
86e9a7ac43 add regression test
Fixes #49685
2018-04-26 13:42:22 -04:00
Niko Matsakis
0361e5938c use reveal_all during drop elaboration
This used to happen by default as part of the normalization routine
that was being used.
2018-04-26 13:31:52 -04:00
Niko Matsakis
2a58875fa2 improved debug output 2018-04-26 13:31:24 -04:00
bors
949010d23e Auto merge of #50228 - irinagpopa:backstory-v2, r=nikomatsakis
Rename rustc_back to rustc_target and move ABI code to it.

Fixes #45226.
2018-04-26 16:00:48 +00:00
Irina Popa
a131c518ad Fixed tidy errors. 2018-04-26 17:49:24 +03:00
Irina Popa
04fa0e7bb3 rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
Anthony Ramine
1c09977c9a Mark SingleVariant as repr(u8) in c-style-enum
I should rather properly fix debuginfo but I have no clue how to do that.
2018-04-26 16:22:18 +02:00
Anthony Ramine
8f36804c00 Treat repr(Rust) univariant fieldless enums as a ZST (fixes #15747)
This makes all those enums be represented the same way:

```rust
enum A1 { B1 }
enum A2 { B2 = 0 }
enum A3 { B3, C3(!) }
```
2018-04-26 16:22:18 +02:00
Irina Popa
030244cd4a rustc_target: move in cabi_* from rustc_trans. 2018-04-26 16:50:31 +03:00
Irina Popa
fb15d44700 rustc_trans: generalize cabi_* to any context type. 2018-04-26 16:50:31 +03:00
Irina Popa
c45dda92fe rustc_target: move for_variant and field TyLayout methods to a trait. 2018-04-26 16:50:29 +03:00
Irina Popa
7a5147616b rustc_target: move LayoutOf's type parameter to an associated type. 2018-04-26 16:50:28 +03:00
Irina Popa
3bd7efadae rustc_target: move in type definitions from rustc_trans::abi. 2018-04-26 16:50:27 +03:00
Irina Popa
bdcd08278a rustc_target: move in type definitions from ty::layout. 2018-04-26 16:50:20 +03:00
Irina Popa
38e964077b Rename rustc_back::target to rustc_target::spec. 2018-04-26 16:39:44 +03:00
Irina Popa
6f03b80020 rustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target. 2018-04-26 16:39:27 +03:00
Anthony Ramine
7bfe3ae00a Add a test for casts of univariant C-like enums 2018-04-26 15:07:04 +02:00
Oliver Schneider
2807f4f773 Properly evaluate zst enum 2018-04-26 15:07:04 +02:00
Anthony Ramine
1839ec5ef8 Consistently use C_uint_big for discriminants 2018-04-26 15:07:04 +02:00
Anthony Ramine
b7c8cc4b77 Properly look for uninhabitedness when handling discriminants 2018-04-26 15:07:04 +02:00
bors
88cd36714c Auto merge of #50245 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #50177 (mark std::str::replace(,n) as #[must_use])
 - #50207 (Hash EntryKind::AssociatedConst const data)
 - #50214 (Js improvements)
 - #50219 (Added missing `.` in docs.)

Failed merges:

 - #50229 (Add setting to go to item if there is only one result)
2018-04-26 11:07:14 +00:00
bors
3eca70a0c5 Auto merge of #50072 - oli-obk:discriminants, r=eddyb
Allow variant discriminant initializers to refer to other initializer…

…s of the same enum

r? @eddyb

fixes the 2.4 failure of https://github.com/rust-lang/rust/issues/49765

cc @durka @retep998
2018-04-26 08:51:39 +00:00
Guillaume Gomez
438f3ca01c
Rollup merge of #50219 - ralfbiedert:master, r=frewsxcv
Added missing `.` in docs.
2018-04-26 10:11:16 +02:00
Guillaume Gomez
8f6b42711f
Rollup merge of #50214 - GuillaumeGomez:JS-improvements, r=QuietMisdreavus
Js improvements

r? @QuietMisdreavus
2018-04-26 10:11:15 +02:00
Guillaume Gomez
0d758ecc61
Rollup merge of #50207 - wesleywiser:hash_const_data, r=eddyb
Hash EntryKind::AssociatedConst const data

Related to #49991
r? @michaelwoerister
cc @eddyb
2018-04-26 10:11:14 +02:00
Guillaume Gomez
3b49b27e0c
Rollup merge of #50177 - matthiaskrgr:std_std_replacen__must_use, r=oli-obk
mark std::str::replace(,n) as #[must_use]

let x = "a b c c";
x.replacen("c", "d", 2");
might not do what people might think it does.
2018-04-26 10:11:11 +02:00
Anthony Ramine
3ca6ad922e Use ScalarPair for tagged enums 2018-04-26 09:30:28 +02:00
Oliver Schneider
195c9f47e9
Allow variant discriminant initializers to refer to other initializers of the same enum 2018-04-26 08:54:14 +02:00
bors
1515cded74 Auto merge of #49732 - Zoxc:sync-dep-graph, r=michaelwoerister
Make incremental compilation thread-safe

r? @michaelwoerister
2018-04-26 06:38:14 +00:00
bors
c18778704c Auto merge of #50236 - nrc:update, r=alexcrichton
Update rustfmt and rls

r? @alexcrichton
2018-04-26 03:36:22 +00:00
Nick Cameron
612830dc77 handle license check 2018-04-26 15:10:11 +12:00
bors
84ce67ef95 Auto merge of #50131 - Manishearth:crate-in-local, r=petrochenkov
Allow crate:: in local paths

Currently if you want to use `crate` locally you have to do `::crate::`. This shouldn't be necessary

(will fix up tests later)

r? @petrochenkov
2018-04-25 23:25:47 +00:00
Nick Cameron
127f9a6416 Update rustfmt and rls 2018-04-26 10:11:28 +12:00
bors
6eb4f1d036 Auto merge of #50016 - tmandry:cleanup-binder, r=nikomatsakis
Make Binder's field private and clean up its usage

AKA "tour de rustc"

Closes #49814.
2018-04-25 20:58:53 +00:00
Manish Goregaokar
9f5e08e0a1 Fix crate:: in local paths 2018-04-25 12:01:59 -07:00