about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-04-14Properly parse '--extern-private' with name and pathAaron Hill-1/+1
2019-04-14Auto merge of #59950 - Centril:rollup-hpmr62i, r=Centrilbors-8/+411
Rollup of 6 pull requests Successful merges: - #59776 (Apply resource-suffix to search-index and source-files scripts as well) - #59784 (Suggest importing macros from the crate root) - #59812 (Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.) - #59874 (Clean up handling of `-Z pgo-gen` commandline option.) - #59890 (Don't generate empty json variables) - #59911 (Revert "compile crates under test w/ -Zemit-stack-sizes") Failed merges: r? @ghost
2019-04-14Rollup merge of #59874 - michaelwoerister:pgo-updates-1, r=cramertjMazdak Farrokhzad-8/+4
Clean up handling of `-Z pgo-gen` commandline option. This PR adapts the `-Z pgo-gen` flag to how Clang and GCC handle the corresponding `-fprofile-generate` flag. In particular, the flag now optionally takes a directory to place the profiling data in and allows to omit the argument (instead of having to pass an empty string).
2019-04-14Rollup merge of #59812 - michaelwoerister:profile-gen-msvc-imp, r=alexcrichtonMazdak Farrokhzad-0/+12
Exclude profiler-generated symbols from MSVC __imp_-symbol workaround. LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime. Since these show up as globals in the LLVM IR, the compiler generates `dllimport`-related `__imp_` stubs for them. This can lead to linker errors because the instrumentation symbols have weak linkage or are in a comdat section, but the `__imp_` stubs aren't. Instead of trying to replicate the linkage/comdat setup for the stubs, this PR just excludes the profiler-related symbols from stub-generation since they aren't supposed to be referenced via `__declspec(dllimport)` anywhere anyway. r? @alexcrichton EDIT: I considered making this more general, i.e. inferring from the symbol name if it is a Rust symbol or not. But then I figured out that that would yield false negatives for `#[no_mangle]` et al, so I went with a blacklist approach.
2019-04-14Rollup merge of #59784 - davidtwco:issue-59764, r=estebankMazdak Farrokhzad-0/+395
Suggest importing macros from the crate root Fixes #59764. r? @estebank cc @varkor
2019-04-14Rollup merge of #59899 - nnethercote:sort-enum-variants-by-size, r=pnkfelixMazdak Farrokhzad-25/+25
In `-Zprint-type-size` output, sort enum variants by size. It's useful to see the biggest variants first. r? @pnkfelix
2019-04-14Rollup merge of #59858 - mark-i-m:dup-matcher-bindings-3, r=CentrilMazdak Farrokhzad-33/+37
Make duplicate matcher bindings a hard error r? @Centril Closes #57742
2019-04-14Rollup merge of #59835 - lzutao:nonzero-signed, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
Re-export NonZero signed variant in std Closes #59834 .
2019-04-14Rollup merge of #59708 - matthewjasper:double-closure-unused-mut, r=pnkfelixMazdak Farrokhzad-8/+11
Mark variables captured by reference as mutable correctly Closes #59620 r? @pnkfelix
2019-04-14Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichtonMazdak Farrokhzad-32/+22
Stabilize the `alloc` crate. This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-13Auto merge of #59922 - Centril:rollup-0qmx4jg, r=Centrilbors-486/+992
Rollup of 8 pull requests Successful merges: - #59781 (Remove check_match from const_eval) - #59820 (proc_macro: stop using LEB128 for RPC.) - #59846 (clarify what the item is in "not a module" error) - #59847 (Error when using `catch` after `try`) - #59859 (Suggest removing `?` to resolve type errors.) - #59862 (Tweak unstable diagnostic output) - #59866 (Recover from missing semicolon based on the found token) - #59892 (Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket) Failed merges: r? @ghost
2019-04-12Add test and fix dedupEsteban Küber-0/+27
2019-04-12Rollup merge of #59866 - estebank:recover-missing-semi, r=petrochenkovMazdak Farrokhzad-0/+52
Recover from missing semicolon based on the found token When encountering one of a few keywords when a semicolon was expected, suggest the semicolon and recover: ``` error: expected one of `.`, `;`, `?`, or an operator, found `let` --> $DIR/recover-missing-semi.rs:4:5 | LL | let _: usize = () | - help: missing semicolon here LL | LL | let _ = 3; | ^^^ error[E0308]: mismatched types --> $DIR/recover-missing-semi.rs:2:20 | LL | let _: usize = () | ^^ expected usize, found () | = note: expected type `usize` found type `()` ```
2019-04-12Rollup merge of #59862 - estebank:tweak-unstable-diag, r=petrochenkovMazdak Farrokhzad-423/+802
Tweak unstable diagnostic output
2019-04-12Rollup merge of #59859 - davidtwco:issue-59756, r=cramertjMazdak Farrokhzad-1/+53
Suggest removing `?` to resolve type errors. Fixes #59756.
2019-04-12Rollup merge of #59847 - Kampfkarren:try-block-catch, r=estebankMazdak Farrokhzad-0/+20
Error when using `catch` after `try` Part of https://github.com/rust-lang/rust/issues/31436
2019-04-12Rollup merge of #59846 - euclio:not-a-module, r=davidtwcoMazdak Farrokhzad-50/+62
clarify what the item is in "not a module" error The motivation here was that I was trying to import an associated constant when I thought it was an enum variant, and got confused by this error. Ideally I would like to add a note saying that associated constants, types, and methods cannot be imported, but I'm not sure that the associated items for a `Def` can be checked at resolve time.
2019-04-12Rollup merge of #59781 - whitfin:issue-59378, r=oli-obkMazdak Farrokhzad-12/+3
Remove check_match from const_eval This fixes #59378. It seems that the `check_match` may be unnecessary, so this removes it per instructions provided in the issue. I re-ran the tests for `librustc_mir` and everything seemed fine!
2019-04-12Stabilize the `alloc` crate.Simon Sapin-32/+22
This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12Auto merge of #59733 - cramertj:wake-by-ref, r=withoutboatsbors-13/+29
Final (one can only hope) futures_api adjustments Based on https://github.com/rust-lang/rust/pull/59119 -- this change is only the latter two commits. cc https://github.com/rust-lang/rust/issues/59725 r? @withoutboats
2019-04-12add the logic for when other_ty is FnDefrchaser53-3/+55
2019-04-12Auto merge of #59910 - Centril:rollup-yjv7b06, r=Centrilbors-68/+204
Rollup of 15 pull requests Successful merges: - #59680 (Document the -Z flag to the rustc book) - #59711 (Add back the substring test) - #59806 (compiletest: Improve no_prefer_dynamic docs) - #59809 (Make trait_methods_not_found use a lock) - #59811 (Kill dead code dominator code.) - #59814 (Fix broken links on std::boxed doc page) - #59821 (improve unknown enum variant errors) - #59831 (Remove strange formatting in `Ordering` docs.) - #59836 (std::ops::Div examples: correct nominator to numerator) - #59857 (SGX target: fix cfg(test) build) - #59876 (Update TRPL to use mdbook 0.2) - #59880 (Remove note about transmute for float bitpatterns.) - #59889 (Update diagnostics.rs) - #59891 (Fix the link to sort_by_cached_key) - #59894 (save-analysis: Pull associated type definition using `qpath_def`) Failed merges: r? @ghost
2019-04-12Rollup merge of #59821 - euclio:unknown-enum-variants, r=davidtwcoMazdak Farrokhzad-68/+175
improve unknown enum variant errors Fixes #56517.
2019-04-12Rollup merge of #59711 - GuillaumeGomez:substring-test, r=QuietMisdreavusMazdak Farrokhzad-0/+29
Add back the substring test Fixes #58331. r? @QuietMisdreavus
2019-04-12Auto merge of #59622 - GuillaumeGomez:improve-one-char-search, r=QuietMisdreavusbors-0/+76
Ensure that exact matches come first in rustdoc search Fixes #59287. cc @scottmcm r? @QuietMisdreavus
2019-04-11Continue evaluating after missing mainEsteban Küber-0/+49
2019-04-12In `-Zprint-type-size` output, sort enum variants by size.Nicholas Nethercote-25/+25
It's useful to see the biggest variants first.
2019-04-12Switch to multipart suggestions.David Wood-167/+29
This commit changes the suggestion so that it is split into multiple parts in an effort to reduce the impact the applied suggestion could have on formatting.
2019-04-12Improve robustness of nested check.David Wood-4/+46
This commit removes the assumption that the start of a use statement will always be on one line with a single space - which was silly in the first place.
2019-04-12Handle edge cases.David Wood-5/+386
This commit introduces more dirty span manipulation into the compiler in order to handle the various edge cases in moving/renaming the macro import so it is at the root of the import.
2019-04-12Handle renamed imports.David Wood-4/+46
This commit extends the suggestion to handle imports that are aliased to another name.
2019-04-12Suggest macro import from crate root.David Wood-3/+25
This commit suggests importing a macro from the root of a crate as the intent may have been to import a macro from the definition location that was annotated with `#[macro_export]`.
2019-04-11review commentsEsteban Küber-2/+2
2019-04-11Fix ui-fulldeps testEsteban Küber-6/+12
2019-04-11remove warnMark Mansi-1/+0
2019-04-11Reword tracking issue noteEsteban Küber-370/+370
2019-04-12improve error messagesrchaser53-13/+39
2019-04-11Clean up handling of -Zpgo-gen commandline option.Michael Woerister-8/+4
2019-04-11Auto merge of #58972 - QuietMisdreavus:intra-doc-link-imports, r=GuillaumeGomezbors-0/+18
rustdoc: don't process `Crate::external_traits` when collecting intra-doc links Part of https://github.com/rust-lang/rust/issues/58745, closes https://github.com/rust-lang/rust/pull/58917 The `collect-intra-doc-links` pass keeps track of the modules it recurses through as it processes items. This is used to know what module to give the resolver when looking up links. When looking through the regular items of the crate, this works fine, but the `DocFolder` trait as written doesn't just process the main crate hierarchy - it also processes the trait items in the `external_traits` map. This is useful for other passes (so they can strip out `#[doc(hidden)]` items, for example), but here it creates a situation where we're processing items "outside" the regular module hierarchy. Since everything in `external_traits` is defined outside the current crate, we can't fall back to finding its module scope like we do with local items. Skipping this collection saves us from emitting some spurious warnings. We don't even lose anything by skipping it, either - the docs loaded from here are only ever rendered through `html::render::document_short` which strips any links out, so the fact that the links haven't been loaded doesn't matter. Hopefully this removes most of the remaining spurious resolution warnings from intra-doc links. r? @GuillaumeGomez
2019-04-10make duplicate matcher bindings a hard errorMark Mansi-32/+37
2019-04-10FeedbackKampfkarren-2/+2
2019-04-10Tweak unstable diagnostic outputEsteban Küber-417/+790
2019-04-10Recover from missing semicolon based on the found tokenEsteban Küber-0/+52
When encountering one of a few keywords when a semicolon was expected, suggest the semicolon and recover: ``` error: expected one of `.`, `;`, `?`, or an operator, found `let` --> $DIR/recover-missing-semi.rs:4:5 | LL | let _: usize = () | - help: missing semicolon here LL | LL | let _ = 3; | ^^^ error[E0308]: mismatched types --> $DIR/recover-missing-semi.rs:2:20 | LL | let _: usize = () | ^^ expected usize, found () | = note: expected type `usize` found type `()` ```
2019-04-10Suggest removing `?` to resolve type errors.David Wood-3/+28
This commit adds a suggestion to remove the `?` from expressions if removing the `?` would resolve a type error.
2019-04-10Fix tests, I thinkKampfkarren-2/+3
2019-04-11fix up unused wrappingn_add in compile-pass testAshley Mannix-1/+1
2019-04-10Fix error brought up by changing tabs to spacesKampfkarren-1/+1
2019-04-10Adhere to tidy scriptKampfkarren-3/+3
2019-04-10Special error when using catch after tryKampfkarren-0/+19
2019-04-10clarify what the item is in "not a module" errorAndy Russell-50/+62