85145 Commits

Author SHA1 Message Date
bors
bf962e2552 Auto merge of #54626 - alexcrichton:dwarf-generics, r=michaelwoerister
rustc: Tweak filenames encoded into metadata

This commit is a fix for #54408 where on nightly right now whenever
generics are inlined the path name listed for the inlined function's
debuginfo is a relative path to the cwd, which surely doesn't exist!
Previously on beta/stable the debuginfo mentioned an absolute path which
still didn't exist, but more predictably didn't exist.

The change between stable/nightly is that nightly is now compiled with
`--remap-path-prefix` to give a deterministic prefix to all
rustc-generated paths in debuginfo. By using `--remap-path-prefix` the
previous logic would recognize that the cwd was remapped, causing the
original relative path name of the standard library to get emitted. If
`--remap-path-prefix` *wasn't* passed in then the logic would create an
absolute path name and then create a new source file entry.

The fix in this commit is to apply the "recreate the source file entry
with an absolute path" logic a bit more aggresively. If the source
file's name was remapped then we don't touch it, but otherwise we always
take the working dir (which may have been remapped) and then join it to
the file to ensure that we process all relative file names as well.

The end result is that the standard library should have an absolute path
for all file names in debuginfo (using our `--remap-path-prefix`
argument) as it does on stable after this patch.

Closes #54408
2018-10-26 14:30:26 +00:00
bors
694cf75298 Auto merge of #53821 - oli-obk:sanity_query, r=RalfJung
Report const eval error inside the query

Functional changes: We no longer warn about bad constants embedded in unused types. This relied on being able to report just a warning, not a hard error on that case, which we cannot do any more now that error reporting is consistently centralized.

r? @RalfJung

fixes #53561
2018-10-26 11:05:00 +00:00
bors
82239b04dc Auto merge of #55362 - ehuss:releases-cargo-new-edition, r=Mark-Simulacrum
Remove `cargo new --edition` from release notes.

This was removed at the last minute (#55315, https://github.com/rust-lang/cargo/pull/6216).
Apologies for not catching this.
2018-10-26 02:58:28 +00:00
bors
7b0735a832 Auto merge of #54145 - nrc:save-path-segments, r=petrochenkov
Keep resolved defs in path prefixes and emit them in save-analysis

Closes https://github.com/nrc/rls-analysis/issues/109

r? @eddyb or @petrochenkov
2018-10-26 00:04:29 +00:00
Eric Huss
19c4e36486 Remove cargo new --edition from release notes. 2018-10-25 13:57:56 -07:00
Nick Cameron
6dd5bb18d7 more reviewer changes 2018-10-26 09:50:51 +13:00
Nick Cameron
63ac2aae51 Fix tests and assertions; add some comments 2018-10-26 09:50:51 +13:00
Nick Cameron
59cb1705d7 rebasing and reviewer changes
Primarily refactoring `(Ident, Option<NodeId>)` to `Segment`
2018-10-26 09:50:51 +13:00
Nick Cameron
8ac3272610 save-analysis: handle missing field names
FIxes https://github.com/rust-lang-nursery/rls/issues/1031
2018-10-26 09:48:44 +13:00
Nick Cameron
cdcbdfdf0a Fix tests and rustdoc 2018-10-26 09:48:44 +13:00
Nick Cameron
c480386391 dump refs for path segments in save-analysis
Requires adding path segments to the hir map
2018-10-26 09:48:44 +13:00
Nick Cameron
609d0bd8ac dump data for prefix path segments 2018-10-26 09:48:44 +13:00
Nick Cameron
c2bb7cadf2 save-analysis: remove hacky, unnecessary code now that we have spans for every ident 2018-10-26 09:48:44 +13:00
Nick Cameron
b49da276b3 Store a resolved def on hir::PathSegment 2018-10-26 09:48:44 +13:00
Nick Cameron
fc67d8fac4 Give each PathSegment a NodeId 2018-10-26 09:48:44 +13:00
bors
4bd4e4130e Auto merge of #54490 - wesleywiser:rewrite_it_in_mir, r=oli-obk
Rewrite the `UnconditionalRecursion` lint to use MIR

Part of #51002

r? @eddyb
2018-10-25 20:40:31 +00:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
13d94ee115 Explain how unused constants may still cause a hard error 2018-10-25 17:20:39 +02:00
Oliver Schneider
1c5ff292fc Rebase fallout 2018-10-25 17:20:39 +02:00
Ralf Jung
d2e682afed preserve const eval error information through trait error system 2018-10-25 16:48:15 +02:00
Ralf Jung
7ed7fc881e add the lint back to the list, and fix tests 2018-10-25 16:48:15 +02:00
Ralf Jung
94586bc133 fix ui tests (rebase fallout) 2018-10-25 16:48:15 +02:00
Ralf Jung
b81302f42d for now, just use NULL ptr for unsized locals 2018-10-25 16:48:15 +02:00
Ralf Jung
7717a63182 fix a test comment 2018-10-25 16:47:35 +02:00
Alexander Regueiro
7c34f2da57 Addressed minor issues brought up in review. 2018-10-25 16:47:35 +02:00
Oliver Schneider
bf8471aeda Rebase fallout in ui output 2018-10-25 16:47:35 +02:00
Oliver Schneider
f4a3e50d78 Update rustdoc test 2018-10-25 16:47:35 +02:00
Oliver Schneider
528c72371c More mono items are generated now 2018-10-25 16:47:35 +02:00
Oliver Schneider
6a6b3309e6 update tests to changes on rustc master 2018-10-25 16:47:35 +02:00
Oliver Schneider
e6f7f4af50 Document error/lint cases in const eval 2018-10-25 16:47:35 +02:00
Oliver Schneider
d736197bc2 Explain the Reveal::UserFacing deduplication trick 2018-10-25 16:47:35 +02:00
Oliver Schneider
b4ee38ede3 Don't extend hir::Def when there's already a dedicated "function-like" detector 2018-10-25 16:47:35 +02:00
Oliver Schneider
73e2b4662d Prepare miri for unsized locals 2018-10-25 16:47:35 +02:00
Oliver Schneider
0f97048618 Deduplicate all the ~~things~~ errors 2018-10-25 16:47:35 +02:00
Oliver Schneider
d34232bcaf Fix rebase fallout 2018-10-25 16:47:34 +02:00
Oliver Schneider
6f84d6edf1 Layout errors can happen because something was too generic 2018-10-25 16:46:19 +02:00
Oliver Schneider
cce53b3631 Forward TooGeneric errors 2018-10-25 16:46:19 +02:00
Oliver Schneider
7fdf06cdde Report const eval error inside the query 2018-10-25 16:46:19 +02:00
bors
8ec22e7ec7 Auto merge of #55347 - pietroalbini:rollup, r=pietroalbini
Rollup of 22 pull requests

Successful merges:

 - #53507 (Add doc for impl From for Waker)
 - #53931 (Gradually expanding libstd's keyword documentation)
 - #54965 (update tcp stream documentation)
 - #54977 (Accept `Option<Box<$t:ty>>` in macro argument)
 - #55138 (in which unused-parens suggestions heed what the user actually wrote)
 - #55173 (Suggest appropriate syntax on missing lifetime specifier in return type)
 - #55200 (Documents `From` implementations for `Stdio`)
 - #55245 (submodules: update clippy from 5afdf8b7 to b1d03437)
 - #55247 (Clarified code example in char primitive doc)
 - #55251 (Fix a typo in the documentation of RangeInclusive)
 - #55253 (only issue "variant of the expected type" suggestion for enums)
 - #55254 (Correct trailing ellipsis in name_from_pat)
 - #55269 (fix typos in various places)
 - #55282 (Remove redundant clone)
 - #55285 (Do some copy editing on the release notes)
 - #55291 (Update stdsimd submodule)
 - #55296 (Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs)
 - #55306 (Regression test for #54478.)
 - #55328 (Fix doc for new copysign functions)
 - #55340 (Operands no longer appear in places)
 - #55345 (Remove is_null)
 - #55348 (Update RELEASES.md after destabilization of non_modrs_mods)

Failed merges:

r? @ghost
2018-10-25 14:40:22 +00:00
Pietro Albini
ea5aad66b4
Rollup merge of #55348 - pietroalbini:backport-stable-notes, r=pietroalbini
Backports the release notes update from stable to master.

r? @ghost
2018-10-25 16:00:39 +02:00
Pietro Albini
7a39bc452b
Update RELEASES.md after destabilization of non_modrs_mods 2018-10-25 15:54:31 +02:00
Pietro Albini
5443f7b017
Rollup merge of #55345 - RalfJung:no-null, r=oli-obk
Remove is_null

It was confusingly named (`is_zero` would have been better, as someone pointed out somewhere but I forgot who or where), and it didn't even reliably test for "is this value 0 at run-time" because out-of-bounds pointers *can* be 0.

It's not used in rustc, and miri only really needs `is_null_ptr` and `to_bytes() == 0`, so let's just kill this method.

r? @oli-obk
2018-10-25 14:31:24 +02:00
Pietro Albini
83906ec6ad
Rollup merge of #55340 - RalfJung:operand-docs, r=oli-obk
Operands no longer appear in places

Fix an outdated comment.
2018-10-25 14:31:22 +02:00
Pietro Albini
401ee42893
Rollup merge of #55328 - raphlinus:copysign_typo, r=joshtriplett
Fix doc for new copysign functions

Thanks to @LukasKalbertodt for catching this. Addresses a comment raised in #55169 after it was merged.
2018-10-25 14:31:21 +02:00
Pietro Albini
b3e57dbdf6
Rollup merge of #55306 - pnkfelix:issue-54478-regression-test-jemalloc-ctl, r=nikomatsakis
Regression test for #54478.

This is a regression test for #54478.

I confirmed that it fails on:
rustdoc 1.30.0-beta.12 (96a229824 2018-10-04)
and passes on:
rustdoc 1.31.0-nightly (f99911a4a 2018-10-23)

Fix #54478
2018-10-25 14:31:20 +02:00
Pietro Albini
1220e1354a
Rollup merge of #55296 - cuviper:rustdoc-ui-backtrace, r=nikomatsakis
Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs

This UI test is sensitive to backtrace output, so it should make sure
that backtraces are not enabled by the environment.
2018-10-25 14:31:18 +02:00
Pietro Albini
c4723b3673
Rollup merge of #55291 - kazcw:master, r=nikomatsakis
Update stdsimd submodule

Fixes a SSE2 bug. (#55249)
2018-10-25 14:31:17 +02:00
Pietro Albini
539ee06a68
Rollup merge of #55285 - integer32llc:release-notes-improvements, r=Aaronepower
Do some copy editing on the release notes

I was reading through the release notes to find something and noticed
some small grammatical and consistency issues.

I'm happy to revert any of these changes if folks disagree with them!
2018-10-25 14:31:16 +02:00
Pietro Albini
555df0f44f
Rollup merge of #55282 - sinkuu:redundant_clone, r=estebank
Remove redundant clone
2018-10-25 14:31:14 +02:00
Pietro Albini
4f14bfdc73
Rollup merge of #55269 - matthiaskrgr:typos_oct, r=zackmdavis
fix typos in various places
2018-10-25 14:31:13 +02:00
Pietro Albini
88341a9939
Rollup merge of #55254 - rust-lang:clean-two-dots, r=GuillaumeGomez
Correct trailing ellipsis in name_from_pat

r? @GuillaumeGomez
2018-10-25 14:31:12 +02:00