121122 Commits

Author SHA1 Message Date
Hoe Hao Cheng
716acff7b1 Remove heterogeneous ordering for SocketAddr 2020-05-24 22:14:06 +08:00
Rakshith Ravi
245ebc7210 Removed all instances of const_field. 2020-05-24 19:38:54 +05:30
Amanieu d'Antras
be2fd61d78 Fix InlineAsmOperand expresions being visited twice during liveness checking 2020-05-24 14:26:20 +01:00
Ralf Jung
9b87f4009b bump Miri 2020-05-24 15:11:00 +02:00
Ralf Jung
b9b1554dac Fix unsizing casts 2020-05-24 15:10:15 +02:00
Kagami Sascha Rosylight
df2f9a4bd1
Use sort_unstable_by in its own docs 2020-05-24 14:56:57 +02:00
ratijas
d1f4796845
Use dyn trait syntax in more comments and docs
Probably missed it out during earlier `dyn` refactoring.
2020-05-24 14:46:50 +03:00
bors
94fccccd2c Auto merge of #72529 - RalfJung:rollup-ydthv90, r=RalfJung
Rollup of 3 pull requests

Successful merges:

 - #72284 (Remove `macro_defs` map)
 - #72393 (Rewrite `Parser::collect_tokens`)
 - #72528 (Fix typo in doc comment.)

Failed merges:

r? @ghost
2020-05-24 11:02:23 +00:00
Guillaume Gomez
2220eb4d8a Clean up E0602 explanation 2020-05-24 12:52:45 +02:00
Ralf Jung
e2e3aacc23
Rollup merge of #72528 - emosenkis:patch-1, r=dtolnay
Fix typo in doc comment.

call_one_force -> call_on**c**e_force
2020-05-24 12:17:12 +02:00
Ralf Jung
8692c45595
Rollup merge of #72393 - Aaron1011:feature/rewrite-collect-tokens, r=petrochenkov
Rewrite `Parser::collect_tokens`

The previous implementation did not work when called on an opening
delimiter, or when called re-entrantly from the same `TokenCursor` stack
depth.

I'm not sure how to test this apart from https://github.com/rust-lang/rust/pull/72287
2020-05-24 12:17:11 +02:00
Ralf Jung
94d96b1d75
Rollup merge of #72284 - Aaron1011:feature/inline-macro-did, r=petrochenkov
Remove `macro_defs` map

We now store the `DefId` directly in `ExpnKind::Macro`. This will allow
us to serialize `ExpnData` in PR #72121 without needing to manage a side
table.
2020-05-24 12:17:09 +02:00
Eitan Mosenkis
806f5815d4
Fix typo in doc comment.
call_one_force -> call_once_force
2020-05-24 11:59:07 +03:00
bors
7726070fa7 Auto merge of #72524 - RalfJung:rollup-s9f1pcc, r=RalfJung
Rollup of 2 pull requests

Successful merges:

 - #72388 (Recursively expand `TokenKind::Interpolated` in `probably_equal_for_proc_macro`)
 - #72517 (small select cleanup)

Failed merges:

r? @ghost
2020-05-24 07:46:13 +00:00
Ralf Jung
7a121ad77f bootstrap: propagate test-args to miri and clippy test suites 2020-05-24 09:45:14 +02:00
Ralf Jung
b97ed1a46c Miri casts: do not blindly rely on dest type 2020-05-24 09:38:29 +02:00
Ralf Jung
6cb1c0eb64
Rollup merge of #72517 - lcnr:refactor-winnowing, r=jonas-schievink
small select cleanup
2020-05-24 09:30:37 +02:00
Ralf Jung
fb848a6b7d
Rollup merge of #72388 - Aaron1011:fix/deep-tokenstream-equality, r=petrochenkov
Recursively expand `TokenKind::Interpolated` in `probably_equal_for_proc_macro`

Fixes #68430

When comparing the captured and re-parsed `TokenStream` for a `TokenKind::Interpolated`, we currently treat any nested `TokenKind::Interpolated` tokens as unequal. If a `TokenKind::Interpolated` token shows up in the captured `TokenStream` due to a `macro_rules!` expansion, we will throw away the captured `TokenStream`, losing span information.

This PR recursively invokes `nt_to_tokenstream` on nested `TokenKind::Interpolated` tokens, effectively flattening the stream into a sequence of non-interpolated tokens. This allows it to compare equal with the re-parsed stream, allowing us to keep the original captured `TokenStream` (with span information).

This requires all of the `probably_equal_for_proc_macro` methods to be moved from `librustc_ast` to `librustc_parse` so that they can call `nt_to_tokenstream`.
2020-05-24 09:30:31 +02:00
Michal Sudwoj
e18054d5c0 Added comment about static variables 2020-05-24 08:20:40 +02:00
Michal Sudwoj
83a5cdf0ae Update src/doc/unstable-book/src/library-features/asm.md
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2020-05-24 08:20:40 +02:00
Michal Sudwoj
70cd375c57 Corrected statement about zero-extension in docs. 2020-05-24 08:20:40 +02:00
Michal Sudwoj
ed559b3770 Updated documentation 2020-05-24 08:20:40 +02:00
Michal Sudwoj
5ec6b5eaee Fixed tests 2020-05-24 08:20:40 +02:00
Michal Sudwoj
6d74e096d8 Added comment on there being no predefined registers 2020-05-24 08:20:40 +02:00
Michal Sudwoj
1070f08aab Deduplicated macro code 2020-05-24 08:20:40 +02:00
Michal Sudwoj
baa801a929 Minor fixes, as requested in PR review 2020-05-24 08:20:40 +02:00
Michal Sudwoj
d77f73e881 Formatted correctly 2020-05-24 08:20:40 +02:00
Michal Sudwoj
58fdc43e03 NVPTX support for new asm! 2020-05-24 08:20:35 +02:00
bors
52b605c8cb Auto merge of #72362 - matthewjasper:remove-rescope, r=nikomatsakis
Remove ReScope

`ReScope` is unnecessary now that AST borrowck is gone and we're erasing the results of region inference in function bodies. This removes about as much of the old regionck code as possible without having to enable NLL fully.

cc #68261

r? @nikomatsakis
2020-05-24 04:15:08 +00:00
Jonas Schievink
2359299537 Clear MIR local type annotations after borrowck 2020-05-24 04:15:23 +02:00
Amanieu d'Antras
3ed1e79cc4 Properly handle InlineAsmOperand::SymFn when collecting monomorphized items
Fixes #72484
2020-05-24 02:04:49 +01:00
bors
3137f8e2d1 Auto merge of #72516 - Dylan-DPC:rollup-cc4w96z, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #71618 (Preserve substitutions when making trait obligations for suggestions)
 - #72092 (Unblock font loading in rustdoc.css)
 - #72400 (Add missing ASM arena declarations to librustc_middle)
 - #72489 (Fix ice-72487)
 - #72502 (fix discriminant type in generator transform)

Failed merges:

r? @ghost
2020-05-24 00:56:20 +00:00
Nick Torres
a709559705 Clarify the documentation of the unnecessary_mut_passed lint 2020-05-23 16:15:30 -07:00
Ralf Jung
fbc6f2c70c make some cast helpers infallible 2020-05-24 01:03:19 +02:00
Bastian Kauschke
82b4fc42fd small select cleanup 2020-05-24 00:06:04 +02:00
Dylan DPC
1e7914467a
Rollup merge of #72502 - RalfJung:generator-discr-ty, r=jonas-schievink
fix discriminant type in generator transform

The generator transform assumed that the discriminant type is always `isize`, which is not correct, leading to [ICEs in Miri](https://github.com/rust-lang/rust/pull/72419/files#r429543536) when some extra sanity checking got enabled.

r? @jonas-schievink @eddyb
2020-05-24 00:00:52 +02:00
Dylan DPC
ee92ddf811
Rollup merge of #72489 - nbdd0121:issue-72487, r=Amanieu
Fix ice-72487

Fixes #72487

r? @Amanieu
2020-05-24 00:00:51 +02:00
Dylan DPC
3948e60700
Rollup merge of #72400 - Aaron1011:fix/asm-incr-ice, r=Amanieu
Add missing ASM arena declarations to librustc_middle

Fixes #72386

These types also need to get allocated on the `librustc_middle` arena
when we deserialize MIR.

@Amanieu: If we end up using your approach in https://github.com/rust-lang/rust/pull/72392 instead, feel free to copy the test I added over to your PR.
2020-05-24 00:00:48 +02:00
Dylan DPC
238a0ce716
Rollup merge of #72092 - workingjubilee:patch-2, r=GuillaumeGomez
Unblock font loading in rustdoc.css

rustdoc's font loading defaults to "auto", so browsers may block render.
But rustdoc's case prefers a faster TTI for scrolling, this means the
strictest font-display in use should be "swap". rustdoc's fonts do provide
notable legibility improvements but first-time users will have little trouble
reading without. This means "optional" is preferred.

The one exception is Source Serif Pro: it's a big difference for body text, so
"fallback" is preferred over "optional" to cause a (tiny) block.

This follows up on (but does not resolve) #20962, taking PageSpeed Insight's rec fairly directly. Supporting reading material: https://drafts.csswg.org/css-fonts-4/#font-display-desc
2020-05-24 00:00:45 +02:00
Dylan DPC
ff48fc91ee
Rollup merge of #71618 - ecstatic-morse:issue-71394, r=nikomatsakis
Preserve substitutions when making trait obligations for suggestions

Resolves #71394.

I *think* `map_bound_ref` is correct here. In any case, I think a lot of the diagnostic code is using `skip_binder` more aggressively than it should be, so I doubt that this is worse than the status quo. The assertion that `new_self_ty` has no escaping bound vars should be enough.

r? @estebank

cc @nikomatsakis Is the call to `skip_binder` on line 551 (and elsewhere in this file) appropriate? 46ec74e60f/src/librustc_trait_selection/traits/error_reporting/suggestions.rs (L537-L565)
2020-05-24 00:00:42 +02:00
bors
4774f9b523 Auto merge of #72474 - mati865:ci-fix, r=pietroalbini
Revert MSYS2 CI workaround

MSYS2 has made workaround for critical packages so older installers like one used by chocolatey can work again.
Fixes https://github.com/rust-lang/rust/issues/72333
2020-05-23 21:21:40 +00:00
Aaron Hill
8da494272f
Add missing ASM arena declaration to librustc_middle
Fixes #72386

This type also needs to get allocated on the `librustc_middle` arena
when we deserialize MIR.
2020-05-23 15:50:37 -04:00
Nadrieril
3e8ba3a3cb Remove out-of-date comment 2020-05-23 19:39:38 +01:00
Nadrieril
7addc115eb Work around type normalization issues 2020-05-23 18:59:27 +01:00
bors
8970e8bcf6 Auto merge of #72504 - Dylan-DPC:rollup-6wi1ifz, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72292 (Replace obligation construction with deref_steps())
 - #72431 (add warning sign to UB examples)
 - #72446 (Impl Ord for proc_macro::LineColumn)
 - #72492 (Add some regression tests)
 - #72496 (Correct small typo: 'not' -> 'note')

Failed merges:

r? @ghost
2020-05-23 17:53:54 +00:00
Nadrieril
3bf94b2c9d Naming 2020-05-23 18:49:38 +01:00
Dylan DPC
a03bf3f5f5
Rollup merge of #72496 - shepmaster:typo, r=Dylan-DPC
Correct small typo: 'not' -> 'note'
2020-05-23 19:10:02 +02:00
Dylan DPC
e91897d214
Rollup merge of #72492 - JohnTitor:add-tests, r=matthewjasper
Add some regression tests

Closes #69415
Closes #72455

r? @matthewjasper
2020-05-23 19:10:01 +02:00
Dylan DPC
67759b74f4
Rollup merge of #72446 - dtolnay:ord, r=petrochenkov
Impl Ord for proc_macro::LineColumn

```rust
impl Ord for LineColumn {...}
impl PartialOrd for LineColumn {...}
```

for https://doc.rust-lang.org/nightly/proc_macro/struct.LineColumn.html.

The ordering is the natural one you would get by writing one line after another, where we compare line first, then compare columns within the same line.
2020-05-23 19:10:00 +02:00
Dylan DPC
d5e3009bd8
Rollup merge of #72431 - RalfJung:ub-warning, r=shepmaster
add warning sign to UB examples

Just to make it less likely that people miss the fact that these are examples for how to *not* do it.
2020-05-23 19:09:58 +02:00