about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-01-29Make run-pass/env-home-dir.rs test more robustMarco A L Barbosa-1/+4
Remove the assumption that home_dir always returns Some This allows the test to be executed with [cross](https://github.com/japaric/cross).
2018-01-23Auto merge of #47678 - kennytm:rollup, r=kennytmbors-103/+302
Rollup of 14 pull requests - Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672 - Failed merges:
2018-01-23Rollup merge of #47672 - ollie27:rustdoc_auto_traits, r=GuillaumeGomezkennytm-2/+54
rustdoc: Show when traits are auto traits
2018-01-23Rollup merge of #47667 - GuillaumeGomez:fix-quoted-search, r=QuietMisdreavuskennytm-2/+25
Fix quoted search r? @QuietMisdreavus
2018-01-23Rollup merge of #47662 - spastorino:add_test_to_nll, r=nikomatsakiskennytm-0/+3
Add dynamic-drop test to nll tests also r? @nikomatsakis Fixes #47585
2018-01-23Rollup merge of #47661 - bjorn3:refactor_driver, r=michaelwoeristerkennytm-39/+22
Inline some rustc_driver function
2018-01-23Rollup merge of #47655 - ↵kennytm-1/+32
etaoins:fix-spurious-warning-on-empty-proc-macro-crate, r=alexcrichton Fix spurious warning on empty proc macro crates While attempting to reproduce rust-lang/rust#47086 I noticed the following warning: ```shell > rustc /dev/null --crate-type proc-macro warning: unused variable: `registrar` --> /dev/null:0:1 ``` As there are no macros to register the automatically generated registrar function for the crate has no body. As a result its `registrar` argument is unused triggering the above warning. The warning is confusing and not easily actionable by the developer. It could also be triggered legitimately by e.g. having all of the macros in a crate #[cfg]'ed out. Fix by naming the generated argument `_registrar` inside `mk_registrar()`. This suppresses the unused variable warning.
2018-01-23Rollup merge of #47635 - Zoxc:remove-attr, r=michaelwoeristerkennytm-16/+13
Remove the IGNORED_ATTR_NAMES thread local
2018-01-23Auto merge of #47620 - GuillaumeGomez:multiple-themes, r=QuietMisdreavusbors-13/+603
Multiple themes for rustdoc r? @QuietMisdreavus
2018-01-23Rollup merge of #47610 - cuviper:captured-dwarf, r=eddybkennytm-3/+10
LLVM5: Update DW_OP_plus to DW_OP_plus_uconst LLVM <= 4.0 used a non-standard interpretation of `DW_OP_plus`. In the DWARF standard, this adds two items on the expressions stack. LLVM's behavior was more like DWARF's `DW_OP_plus_uconst` -- adding a constant that follows the op. The patch series starting with [D33892] switched to the standard DWARF interpretation, so we need to follow. [D33892]: https://reviews.llvm.org/D33892 Fixes #47464 r? @eddyb
2018-01-23Rollup merge of #47558 - spastorino:rustc_args, r=nikomatsakiskennytm-0/+18
Add rustc-args option to test runner r? @nikomatsakis
2018-01-23Rollup merge of #47554 - EdSchouten:cloudabi-jemalloc, r=nikomatsakiskennytm-3/+10
Make liballoc_jemalloc work on CloudABI. The automated builds for CloudABI in dist-various-2 don't use --disable-jemalloc, even though my original container image did. Instead of setting that flag, let's go the extra mile of making jemalloc work. CloudABI's C library already uses jemalloc and now exposes the API extensions used by us. This makes the CloudABI dist work out of the box.
2018-01-23Rollup merge of #47549 - Manishearth:29723-regression, r=nikomatsakiskennytm-0/+39
Add regression test for #29723 cc #29723 r? @nikomatsakis
2018-01-23Rollup merge of #47541 - psumbera:master, r=eddybkennytm-1/+6
Fixes sparc64 cabi fixes. Argument up to 16 bytes size is provided in registers. Return value up to 32 bytes size is stored in registers. Fixes: #46679 --- Firefox now (almost) build on sparc. Original rust issue seems to be gone. Note that I'm not rust expert and the fix was suggested in bug.
2018-01-23Rollup merge of #47440 - mark-i-m:zunpretty, r=nikomatsakiskennytm-27/+38
Change the --unpretty flag to -Z unpretty First PR :smile: ! -Z unpretty no longer requires -Z unstable-options. Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI). Fix #47395 r? @nikomatsakis EDIT: apparently rust-highfive doesn't see edits...
2018-01-23Rollup merge of #47425 - EdSchouten:immutable-tls, r=nikomatsakiskennytm-0/+21
Properly pass down immutability info for thread-locals. For thread-locals we call into cat_rvalue_node() to create a CMT (Category, Mutability, Type) that always has McDeclared. This is incorrect for thread-locals that don't have the 'mut' keyword; we should use McImmutable there. Extend cat_rvalue_node() to have an additional mutability parameter. Fix up all the callers to make use of that function. Also extend one of the existing unit tests to cover this. Fixes: #47053
2018-01-23Rollup merge of #47423 - est31:rustbook_checking, r=alexcrichtonkennytm-9/+11
Check for deadlinks from the summary during book generation Previously, any deadlinks from a book's SUMMARY.md wouldn't cause any errors or warnings or similar but mdbook would simply create a page with blank content. This has kept bug #47394 hidden. It should have been detected back in the PR when those wrongly named files got added to the book. PR #47414 was one component of the solution. This change is a second line of defense for the unstable book and a first line of defense for any other book. We also update mdbook to the most recent version.
2018-01-23Auto merge of #47046 - Manishearth:intra-doc-links, ↵bors-264/+995
r=eddyb,GuillaumeGomez,QuietMisdreavus,Manishearth Implement RFC 1946 - intra-rustdoc links https://github.com/rust-lang/rfcs/pull/1946 https://github.com/rust-lang/rust/issues/43466 Note for reviewers: The plain line counts are a little inflated because of how the markdown link parsing was done. [Read the file diff with "whitespace only" changes removed](https://github.com/rust-lang/rust/pull/47046/files?w=1) to get a better view of what actually changed there. This pulls the name/path resolution mechanisms out of the compiler and runs it on the markdown in a crate's docs, so that links can be made to `SomeStruct` directly rather than finding the folder path to `struct.SomeStruct.html`. Check the `src/test/rustdoc/intra-paths.rs` test in this PR for a demo. The change was... a little invasive, but unlocks a really powerful mechanism for writing documentation that doesn't care about where an item was written to on the hard disk. Items included: - [x] Make work with the hoedown renderer - [x] Handle relative paths - [x] Parse out the "path ambiguities" qualifiers (`[crate foo]`, `[struct Foo]`, `[foo()]`, `[static FOO]`, `[foo!]`, etc) - [x] Resolve foreign macros - [x] Resolve local macros - [x] Handle the use of inner/outer attributes giving different resolution scopes (handling for non-modules pushed to different PR) Items not included: - [ ] Make sure cross-crate inlining works (blocked on refactor described in https://github.com/rust-lang/rust/pull/47046#issuecomment-354824520) - [ ] Implied Shortcut Reference Links (where just doing `[::std::iter::Iterator][]` without a reference anchor will resolve using the reference name rather than the link target) (requires modifying the markdown parser - blocked on Hoedown/Pulldown switch and https://github.com/google/pulldown-cmark/issues/121) - [ ] Handle enum variants and UFCS methods (Enum variants link to the enum page, associated methods don't link at all) - [ ] Emit more warnings/errors when things fail to resolve (linking to a value-namespaced item without a qualifier will emit an error, otherwise the link is just treated as a url, not a rust path) - [ ] Give better spans for resolution errors (currently the span for the first doc comment is used) - [ ] Check for inner doc comments on things that aren't modules I'm making the PR, but it should be noted that most of the work was done by Misdreavus :smile: (Editor's note: This has become a lie, check that commit log, Manish did a ton of work after this PR was opened `>_>`)
2018-01-23rustdoc: Show when traits are auto traitsOliver Middleton-2/+54
2018-01-23Fasten even more theme switchGuillaume Gomez-12/+15
2018-01-22Auto merge of #47373 - wesleywiser:incr_cache_hashing, r=michaelwoeristerbors-13/+51
[Incremental] Cache hashes for AdDef and ty::Slice<T> r? @michaelwoerister
2018-01-22don't process code blocks when scanning for linksQuietMisdreavus-2/+1
2018-01-22Fasten up theme loadingGuillaume Gomez-25/+49
2018-01-22Fix quoted searchGuillaume Gomez-2/+25
2018-01-22Change theme iconGuillaume Gomez-1/+6
2018-01-22Auto merge of #47507 - alexcrichton:rerun-bat-scripts, r=michaelwoeristerbors-32/+181
rustc: Lower link args to `@`-files on Windows more When spawning a linker rustc has historically been known to blow OS limits for the command line being too large, notably on Windows. This is especially true of incremental compilation where there can be dozens of object files per compilation. The compiler currently has logic for detecting a failure to spawn and instead passing arguments via a file instead, but this failure detection only triggers if a process actually fails to spawn. Unfortunately on Windows we've got something else to worry about which is `cmd.exe`. The compiler may be running a linker through `cmd.exe` where `cmd.exe` has a limit of 8192 on the command line vs 32k on `CreateProcess`. Moreso rustc actually succeeds in spawning `cmd.exe` today, it's just that after it's running `cmd.exe` fails to spawn its child, which rustc doesn't currently detect. Consequently this commit updates the logic for the spawning the linker on Windows to instead have a heuristic to see if we need to pass arguments via a file. This heuristic is an overly pessimistic and "inaccurate" calculation which just calls `len` on a bunch of `OsString` instances (where `len` is not precisely the length in u16 elements). This number, when exceeding the 6k threshold, will force rustc to always pass arguments through a file. This strategy should avoid us trying to parse the output on Windows of the linker to see if it successfully spawned yet failed to actually sub-spawn the linker. We may just be passing arguments through files a little more commonly now... The motivation for this commit was a recent bug in Gecko [1] when beta testing, notably when incremental compilation was enabled it blew out the limit on `cmd.exe`. This commit will also fix #46999 as well though as emscripten uses a bat script as well (and we're blowing the limit there). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1430886 Closes #46999
2018-01-22tweak colors on dark themeQuietMisdreavus-26/+27
2018-01-22Add dynamic-drop test to nll tests alsoSantiago Pastorino-0/+3
2018-01-22Inline some rustc_driver functionbjorn3-39/+22
2018-01-22Temporary fix missing escape_href in hoedown_link by copying pulldown's codeManish Goregaokar-1/+53
2018-01-22Auto merge of #47353 - nikomatsakis:nll-issue-47189, r=pnkfelix+nmatsakisbors-8/+99
renumber regions in generators This fixes #47189, but I think we still have to double check various things around how to treat generators in MIR type check + borrow check (e.g., what borrows should be invalidated by a `Suspend`? What consistency properties should type check be enforcing anyway around the "interior" type?) Also fixes #47587 thanks to @spastorino's commit. r? @pnkfelix
2018-01-22Update to new commonmark argManish Goregaokar-3/+3
2018-01-22Fix spurious warning on empty proc macro cratesRyan Cumming-1/+32
While attempting to reproduce rust-lang/rust#47086 I noticed the following warning: ```shell > rustc /dev/null --crate-type proc-macro warning: unused variable: `registrar` --> /dev/null:0:1 ``` As there are no macros to register the automatically generated registrar function for the crate has no body. As a result its `registrar` argument is unused triggering the above warning. The warning is confusing and not easily actionable by the developer. It could also be triggered legitimately by e.g. having all of the macros in a crate #[cfg]'ed out. Fix by naming the generated argument `_registrar` inside `mk_registrar()`. This suppresses the unused variable warning.
2018-01-22Review fixesManish Goregaokar-2/+2
2018-01-22Move macro_resolve() into a functionManish Goregaokar-27/+29
2018-01-22Move resolve() into a functionManish Goregaokar-23/+25
2018-01-22Add ambiguity errors for macrosManish Goregaokar-19/+35
2018-01-22Move the figuring out of the 'kind' of def out into functionsManish Goregaokar-37/+64
2018-01-22Allow macros to be resolved with ambiguous idents tooManish Goregaokar-20/+30
2018-01-22Allow function@, value@, macro@Manish Goregaokar-2/+6
2018-01-22Error only in the case of overlapManish Goregaokar-20/+49
2018-01-22Use the registered def id (makes enum variants link to the enum page instead ↵Manish Goregaokar-2/+2
of not at all)
2018-01-22Better error messageManish Goregaokar-5/+12
2018-01-22value-namespace items require a marker, so emit an errorQuietMisdreavus-5/+11
2018-01-22resolve module docs based on inner/outer attributesQuietMisdreavus-6/+17
2018-01-22clean module docs while its module ID is still on the stackQuietMisdreavus-1/+2
2018-01-22add ambiguity markers to the intra-links testQuietMisdreavus-0/+14
2018-01-22use @ instead of space for link ambiguity markersQuietMisdreavus-6/+6
since spaces aren't allowed in link targets in commonmark, a new symbol is needed to separate the marker from the rest of the path. hence, @
2018-01-22add a macro to the intra-links testQuietMisdreavus-8/+15
2018-01-22Store a list of local macros on the resolver; use for resolving intra-doc ↵Manish Goregaokar-1/+6
macro links