Commit Graph

81356 Commits

Author SHA1 Message Date
dylan_DPC
dbb756ded7 tidy up 2018-07-20 18:40:52 +05:30
Felix S. Klock II
f153be6258 For some reason, on my linux box, using -Zverbose here is causing a linker failure.
Rather than try to work out what was happening, I just removed the flag because
I see no reason for it to be on this test.
2018-07-20 14:26:44 +02:00
Felix S. Klock II
1185798680 Regression test for issue. 2018-07-20 14:26:40 +02:00
dylan_DPC
4e3339efda move NllLivenessMap and LocalWithRegion to liveness_map 2018-07-20 17:51:34 +05:30
Felix S. Klock II
c83602a702 When type-checking binops, LHS of assign-op like += is invariant.
Therefore we cannot coerce it to a supertype the same way that we can
the LHS of `+`.

Addresses issue 52126.
2018-07-20 13:12:30 +02:00
bors
3bea4d1fc6 Auto merge of #52476 - wesleywiser:categorize_queries, r=nikomatsakis
Categorize queries for later self-profiling

Change the define_queries! macro per feedback on #51657.

Big thanks to @mark-i-m for the help getting the macro changes correct!

I'm pulling this commit out of the other PR because it's hard to keep up-to-date as queries are added or changed.

r? @nikomatsakis
2018-07-20 11:10:58 +00:00
Vadim Petrochenkov
382285a01d Revert some use of PtrKey to fix parallel_queries build 2018-07-20 12:45:07 +03:00
Vadim Petrochenkov
e7aeb2b1c7 resolve: Add more comments to in-module resolution 2018-07-20 12:22:25 +03:00
Vadim Petrochenkov
32453db332 resolve: Fully prohibit shadowing of in-scope names by globs in macro paths 2018-07-20 12:22:24 +03:00
Vadim Petrochenkov
2eb83ee527 data_structures: Add a reference wrapper for pointer-indexed maps/sets
Use `ptr::eq` for comparing pointers
2018-07-20 12:22:24 +03:00
Vadim Petrochenkov
414a86e759 resolve: Add some comments to in-module resolution 2018-07-20 12:22:24 +03:00
Vadim Petrochenkov
c2533b64a3 resolve: Remove SingleImports in favor of a simple set 2018-07-20 12:22:24 +03:00
Vadim Petrochenkov
22143491bc resolve: Rename global_macros to macro_prelude
Rename `shadows_glob` to `shadowed_glob`
2018-07-20 12:22:24 +03:00
Vadim Petrochenkov
c44f72430c resolve: Remove unused parameter from resolve_ident_in_module 2018-07-20 12:22:24 +03:00
bors
4260c8b1e4 Auto merge of #52467 - alexcrichton:lints-and-macros, r=Manishearth
Squash all lints tied to foreign macros by default

This PR is a continuation of https://github.com/rust-lang/rust/pull/49755 (thanks for the initial jump-start @Dylan-DPC!) and is targeted at solving https://github.com/rust-lang/rust/issues/48855. This change updates the lint infrastructure to, by default, ignore all lints emitted for code that originates in a foreign macro. For example if `println!("...")` injects some idiomatic warnings these are all ignored by default. The rationale here is that for almost all lints there's no action that can be taken if the code originates from a foreign lint.

Closes #48855
Closes #52483
Closes #52479
2018-07-20 08:54:14 +00:00
ljedrz
576cfc510a Remove duplicate E0396 tests 2018-07-20 09:47:55 +02:00
bors
a5097f3d68 Auto merge of #52445 - alexcrichton:wasm-import-module, r=eddyb
rustc: Stabilize #[wasm_import_module] as #[link(...)]

This commit stabilizes the `#[wasm_import_module]` attribute as
`#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in
the `#[link]` attribute is used to configured the module name that the imports
are listed with. The WebAssembly specification indicates two utf-8 names are
associated with all imported items, one for the module the item comes from and
one for the item itself. The item itself is configurable in Rust via its
identifier or `#[link_name = "..."]`, but the module name was previously not
configurable and defaulted to `"env"`. This commit ensures that this is also
configurable.

Closes #52090
2018-07-20 06:40:10 +00:00
ljedrz
35a3d6f76b Remove obsolete armv5te vars from the dist-various-1 Dockerfile 2018-07-20 08:34:34 +02:00
Esteban Küber
85da68cb6d Rebase and fix text changed by master 2018-07-19 23:21:00 -07:00
Esteban Küber
f4306ffbfc Use correct spans for format string errors
When encountering format string errors in a raw string, or regular
string literal with embedded newlines, account for the positional
change to use correct spans.

:drive by fix: 🚗
2018-07-19 23:18:07 -07:00
Esteban Küber
154dee2dcc rework println 2018-07-19 23:18:07 -07:00
Esteban Küber
a47653214f Fix hir tree test 2018-07-19 23:18:07 -07:00
Esteban Küber
e613bfb701 Same change as println for eprintln 2018-07-19 23:18:07 -07:00
Esteban Küber
fbce952193 review comments: modify note wording and change println
- Don't print the newline on its own to avoid the possibility of
  printing it out of order due to `stdout` locking.
- Modify wording of `concat!()` with non-literals to not mislead into
  believing that only `&str` literals are accepted.
- Add test for `concat!()` with non-literals.
2018-07-19 23:18:07 -07:00
Esteban Küber
f53c145ef1 Improve suggestion for missing fmt str in println
Avoid using `concat!(fmt, "\n")` to improve the diagnostics being
emitted when the first `println!()` argument isn't a formatting string
literal.
2018-07-19 23:18:07 -07:00
Nicholas Nethercote
798209e78b Speed up SparseBitMatrix.
Using a `BTreeMap` to represent rows in the bit matrix is really slow.
This patch changes things so that each row is represented by a
`BitVector`. This is a less sparse representation, but a much faster
one.

As a result, `SparseBitSet` and `SparseChunk` can be removed.

Other minor changes in this patch.

- It renames `BitVector::insert()` as `merge()`, which matches the
  terminology in the other classes in bitvec.rs.

- It removes `SparseBitMatrix::is_subset()`, which is unused.

- It reinstates `RegionValueElements::num_elements()`, which #52190 had
  removed.

- It removes a low-value `debug!` call in `SparseBitMatrix::add()`.
2018-07-20 15:15:06 +10:00
Niko Matsakis
67685dee3f always get number of live variables from the map 2018-07-20 00:46:06 -04:00
Eduard-Mihai Burtescu
99eac011c6 proc_macro: avoid exposing internal details in formatting impls. 2018-07-20 06:27:16 +03:00
Eduard-Mihai Burtescu
bc2b21cc4e proc_macro: move some implementation details to a rustc module. 2018-07-20 06:26:33 +03:00
bors
bc14d71622 Auto merge of #52349 - RalfJung:once, r=alexcrichton
sync::Once use release-acquire access modes

Nothing here makes a case distinction like "this happened before OR after that". All we need is to get happens-before edges whenever we see that the state/signal has been changed. Release-acquire is good enough for that.
2018-07-20 02:52:19 +00:00
Eduard-Mihai Burtescu
e5e29d1a19 proc_macro: don't expose compiler-internal FileName in public API. 2018-07-20 00:15:11 +03:00
Eduard-Mihai Burtescu
56aaa53278 proc_macro: clean up the implementation of quasi-quoting. 2018-07-20 00:15:11 +03:00
Eduard-Mihai Burtescu
d10d0b3e9e proc_macro: don't try to reflect literals in quasi-quoting. 2018-07-20 00:15:11 +03:00
Eduard-Mihai Burtescu
c0adb05d34 proc_macro: don't use DiagnosticBuilder for building up Diagnostics. 2018-07-20 00:15:11 +03:00
bors
c7cba3d33f Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakis
Implement existential types

(not for associated types yet)

r? @nikomatsakis

cc @Centril @varkor @alexreg
2018-07-19 21:14:01 +00:00
Tommi Komulainen
8b80c9f5a1 Cursor: update docs to clarify Cursor only works with in-memory buffers
Reduce misconceptions about Cursor being more general than it really is.

Fixes: #52470
2018-07-19 21:11:51 +02:00
bors
11864c4e6c Auto merge of #51854 - davidtwco:rfc-2008-rustdoc, r=QuietMisdreavus
RFC 2008 non-exhaustive enums/structs: Rustdoc

Part of #44109. Not sure how those who maintain rustdoc primarily would prefer this addition look or where it should be placed, happy to make any changes required.

r? @QuietMisdreavus (not sure if this is the right person, just guessing)
2018-07-19 19:03:03 +00:00
dylan_DPC
9910dee677 tidy fixes 2018-07-20 00:22:57 +05:30
dylan_DPC
2255786212 left out one field during merge 2018-07-19 23:36:26 +05:30
dylan_DPC
1951a30702 convert LocalWithRegion to Local 2018-07-19 23:18:08 +05:30
dylan_DPC
0819ba9bea mir/mod.rs / visit.rs reverted back to using Local 2018-07-19 23:18:07 +05:30
dylan_DPC
0d847ec1ab add LocalWithRegion NllLivenessMap 2018-07-19 23:18:03 +05:30
Niko Matsakis
43b69c2777 make liveness generic over set of local variables
We used to hardcode that we wanted the liveness of *all* variables.
This can now be configured by selecting an alternative index type
V and providing a (partial) map from locals to that new type V.
2018-07-19 23:15:26 +05:30
dylan_DPC
4b5f0ba8c2 generic shuffle continues 2018-07-19 23:15:25 +05:30
dylan_DPC
d25231f84a use LiveVariableMap as trait bound 2018-07-19 23:15:24 +05:30
dylan_DPC
f2b5583f60 add trait structs and other changes from V to local 2018-07-19 23:15:16 +05:30
dylan_DPC
38c7d1ab7c add generic parameter 2018-07-19 23:14:10 +05:30
Oliver Schneider
9017f79282 Generate a page for existential types 2018-07-19 18:11:28 +02:00
David Wood
b671bdc381
Updated FRU terminology. 2018-07-19 17:03:17 +01:00
Alex Crichton
f775c6d7ce Fix docker/run.sh script when run locally
Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is
being run locally and has previously executed.
2018-07-19 07:48:17 -07:00