Commit Graph

80839 Commits

Author SHA1 Message Date
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
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
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
Alex Crichton
f2f7ab9da8 rustc: Fix two custom attributes with custom derive
This commit fixes an issue where multiple custom attributes could not be fed
into a custom derive in some situations with the `use_extern_macros` feature
enabled. The problem was that the macro expander didn't consider that it was
making progress when we were deducing that attributes should be lumped in with
custom derive invocations.

The fix applied here was to track in the expander if our attribute is changing
(getting stashed away elsewhere and replaced with a new invocation). If it is
swapped then it's considered progress, otherwise behavior should remain the
same.

Closes #52525
2018-07-19 07:46:44 -07:00
Alex Crichton
53323751a9 proc_macro: Preserve spans of attributes on functions
This commit updates the tokenization of items which are subsequently passed to
`proc_macro` to ensure that span information is preserved on attributes as much
as possible. Previously this area of the code suffered from #43081 where we
haven't actually implemented converting an attribute to to a token tree yet, but
a local fix was possible here.

Closes #47941
2018-07-19 07:06:44 -07:00
bors
a8247dd5c6 Auto merge of #52197 - euclio:exit-code, r=oli-obk
overhaul exit codes for rustc and rustdoc

This commit changes the exit status of rustc to 1 in the presence of
compilation errors. In the event of an unexpected panic (ICE) the
standard panic error exit status of 101 remains.

A run-make test is added to ensure that the exit code does not regress,
and compiletest is updated to check for an exit status of 1 or 101,
depending on the mode and suite.

This is a breaking change for custom drivers.

Note that while changes were made to the rustdoc binary, there is no
intended behavior change. rustdoc errors (i.e., failed lints) will still
report 101. While this could *also* hide potential ICEs, I will leave
that work to a future PR.

Fixes #51971.
2018-07-19 13:46:15 +00:00
bors
5ba21844f6 Auto merge of #52515 - Manishearth:clippyup, r=kennytm
Update clippy

Silences the warnings for now, will fix those over time.
2018-07-19 09:55:17 +00:00
ljedrz
0700558673 Enable run-pass/sepcomp-lib-lto.rs on Android 2018-07-19 10:11:55 +02:00
Ralf Jung
16c057256f fix safety-related comment in slice::rotate 2018-07-19 09:11:56 +02:00
Manish Goregaokar
6c06b015a1 Update clippy 2018-07-18 20:25:11 -07:00
bors
0fc4501256 Auto merge of #52429 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update Cargo and stdsimd submodules

Update Cargo to bring in some bug fixes and such, and update `stdsimd` to...

Closes #52403
2018-07-19 03:05:05 +00:00
bors
629d891499 Auto merge of #52486 - kennytm:rollup, r=kennytm
Rollup of 13 pull requests

Successful merges:

 - #51628 (use checked write in `LineWriter` example)
 - #52116 (Handle array manually in str case conversion methods)
 - #52218 (Amend option.take examples)
 - #52418 (Do not use desugared ident when suggesting adding a type)
 - #52439 (Revert some changes from #51917 to fix custom libdir)
 - #52455 (Fix doc comment: use `?` instead of `.unwrap()`)
 - #52458 (rustc: Fix a suggestion for the `proc_macro` feature)
 - #52464 (Allow clippy to be installed with make install)
 - #52472 (rustc: Enable `use_extern_macros` in 2018 edition)
 - #52477 (Clarify short-circuiting behvaior of Iterator::zip.)
 - #52480 (Cleanup #24958)
 - #52487 (Don't build twice the sanitizers on Linux)
 - #52510 (rustdoc: remove FIXME about macro redirects)

Failed merges:

r? @ghost
2018-07-19 00:56:21 +00:00
Alex Crichton
52d7ee83c0 Update Cargo submodule 2018-07-18 15:30:39 -07:00
bors
166795dda6 Auto merge of #52431 - semarie:compiler-builtins, r=alexcrichton
update compiler-builtins for openbsd

import rust-lang-nursery/compiler-builtins/pull/249 in rust main line.

it solves an issue on OpenBSD with building of `librsvg`.
2018-07-18 22:15:46 +00:00
kennytm
ae9c550415
Rollup merge of #52510 - QuietMisdreavus:redirects-are-cool, r=nrc
rustdoc: remove FIXME about macro redirects

Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay.

Closes #35705
2018-07-19 05:46:10 +08:00
kennytm
8336f1b171
Rollup merge of #52418 - estebank:desugaring-type, r=nikomatsakis
Do not use desugared ident when suggesting adding a type

Re #51116.
2018-07-19 05:45:16 +08:00
QuietMisdreavus
5d5414480c
remove FIXME about macro redirects
Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay.

Closes #35705
2018-07-18 15:41:13 -05:00
David Wood
959a13d53e
Updated wording and placement of non-exhaustive notice so it is collapsed by default and easier to understand. 2018-07-18 20:27:25 +01:00
Alex Crichton
829bc268a9 rustc: Remove a workaroudn in ThinLTO fixed upstream
This commit removes a hack in our ThinLTO passes which removes available
externally functions manually. The [upstream bug][1] has long since been fixed,
so we should be able to rely on LLVM natively for this now!

[1]: https://bugs.llvm.org/show_bug.cgi?id=35736
2018-07-18 11:37:56 -07:00
Sébastien Marie
49bc25bf05 update compiler-builtins for openbsd 2018-07-18 10:38:56 -07:00
Esteban Küber
2c5b60d8f0 Update test output 2018-07-18 10:04:10 -07:00
Esteban Küber
4c96932da7 Change label span to point at iterator instead of iter item 2018-07-18 10:02:15 -07:00
Esteban Küber
ed362c07ff Do not use desugared ident when suggesting adding a type 2018-07-18 10:02:15 -07:00
kennytm
b1c6b76739
Rollup merge of #52480 - ljedrz:cleanup_24958, r=oli-obk
Cleanup #24958

Since #24958 was closed we might want to remove the workarounds it introduced for android, arm and aarch64.
2018-07-19 01:00:33 +08:00
kennytm
9fe86e566d
Rollup merge of #51628 - euclio:line-writer, r=frewsxcv
use checked write in `LineWriter` example

The example was wrong because it didn't check the return value of
`write()`, and it didn't flush the buffer before comparing the contents
of the file.

Fixes #51621.
2018-07-19 00:59:47 +08:00