summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-07-27Disable lints in rustdocOliver Middleton-0/+4
2018-07-26For some reason, on my linux box, using `-Zverbose` here is causing a linker ↵Felix S. Klock II-1/+1
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-26Regression test for issue.Felix S. Klock II-0/+88
2018-07-25fix beta backportPietro Albini-2/+2
2018-07-25add failure-status to rustdoc doctest ui testQuietMisdreavus-9/+10
2018-07-25normalize test output so it can be run from repo rootQuietMisdreavus-10/+14
2018-07-25update stdout file with test path normalizationQuietMisdreavus-10/+10
2018-07-25report doctest compile failures correctlyQuietMisdreavus-3/+19
2018-07-25add ui test for failing doctestQuietMisdreavus-0/+40
2018-07-22Abort instead of UB if promotion failsOliver Schneider-0/+38
2018-07-14add test for #52213Ariel Ben-Yehuda-0/+24
2018-07-14Fix rustdoc run failures by shutting down definitely some lintsGuillaume Gomez-0/+24
2018-07-12rustdoc: Hide struct and enum variant constructor importsOliver Middleton-0/+25
2018-07-05Do not allow LLVM to increase a TLS's alignment on macOS.kennytm-0/+55
2018-07-05Fix macro missing from doc searchGuillaume Gomez-0/+20
2018-06-28actually fix testmark-1/+1
2018-06-28fix testmark-4/+7
2018-06-28Prohibit global_allocator in submodules for nowMark Mansi-1/+9
- we need to figure out hygiene first - change the test to check that the prohibition works with a good error msg - leaves some comments and debugging code - leaves some of our supposed fixes
2018-06-28Attempt to fix hygiene for global_allocatorMark Mansi-0/+37
2018-06-27use `pat_ty_adjusted` from `expr_use_visitor` to type of argumentsNiko Matsakis-0/+42
2018-06-27Don't use `ParamEnv::reveal_all()` if there is a real one availableOliver Schneider-0/+28
2018-06-20Auto merge of #51638 - spastorino:diagnostic-suggest-drop-in-reverse, ↵bors-0/+48
r=nikomatsakis Diagnostic suggest drop in reverse Closes #51195
2018-06-19Suggest that values are dropped in the opposite order they are definedSantiago Pastorino-0/+48
2018-06-19Auto merge of #51639 - SimonSapin:missing-alloc, r=rkruppebors-0/+30
Update the error message for a missing global allocator Don’t mention `#[default_lib_allocator]` (which is an implementation detail irrelevant to most users) and instead suggest using `#[global_allocator]`, which is often the correct fix.
2018-06-19Auto merge of #51275 - ↵bors-112/+258
pnkfelix:nll-diagnostics-revise-check-access-permissions, r=nikomatsakis NLL diagnostics: revise `fn check_access_permissions` NLL: revise `fn check_access_permissions` so that its (still branchy) shares more code paths between the different cases, and also provide more diagnostics in more cases (though the added diagnostics still do not always meet the quality bar established by AST-borrowck) ---- Transcribing "checklist" suggested by Niko, except I am rendering it as a table to make it clear that I do not regard every item in the list to be a "must have" for landing this PR. goal | does this PR do it? -----|------------------------------ no suggestions for `ref mut` | yes suggestions for direct local assignment (`{ let x = 3; x = 4; }`) | yes (see commits at end) suggestions for direct field assignment (`{ let x = (3, 4); x.0 = 5; }` | yes (see commits at end) suggestions for upvars (`let x = 3; let c = \|\| { &mut x; }`) | yes Note that I added support for a couple of rows via changes that are not strictly part of `fn check_access_permissions`. If desired I can remove those commits from this PR and leave them for a later PR. Fix #51031 Fix #51032 (bug #51191 needs a little more investigation before closing.) Fix #51578
2018-06-19Auto merge of #51543 - SimonSapin:oom, r=SimonSapinbors-7/+11
Rename OOM to allocation error The acronym is not descriptive unless one has seen it before. * Rename the `oom` function to `handle_alloc_error`. It was **stabilized in 1.28**, so if we do this at all we need to land it this cycle. * Rename `set_oom_hook` to `set_alloc_error_hook` * Rename `take_oom_hook` to `take_alloc_error_hook` Bikeshed: `on` v.s. `for`, `alloc` v.s. `allocator`, `error` v.s. `failure`
2018-06-19Update the error message for a missing global allocatorSimon Sapin-1/+1
Don’t mention `#[default_lib_allocator]` (which is an implementation detail irrelevant to most users) and instead suggest using `#[global_allocator]`, which is often the correct fix.
2018-06-19Add a UI test for the missing allocator error messageSimon Sapin-0/+30
2018-06-19Add unit test for case that didn't seem to be covered in existing UI testsFelix S. Klock II-0/+46
(since I made this mistake at first but the tests didn't catch it): we should not suggest adding `mut` to a reassigned `ref` or `ref mut` binding. (The Rust language, since at least 1.0, does not have `mut ref mut` or `ref mut mut` etc.)
2018-06-19Update the existing compile-fail tests to reflect diagnostic changes in NLL.Felix S. Klock II-1/+8
2018-06-19Update the existing UI tests to reflect diagnostic changes in NLL.Felix S. Klock II-5/+38
2018-06-19updates to compile-fail tests for changes to NLL.Felix S. Klock II-3/+3
2018-06-19NLL: Updates to diagnostic output in `test/ui`.Felix S. Klock II-103/+163
2018-06-19Auto merge of #50383 - stevepentland:union-derive, r=oli-obkbors-0/+52
Add ability to apply custom derive to union types. The Union item type has been included in the allowed types for a custom derive. fyi @abonander Closes #50223
2018-06-19Auto merge of #51278 - EPashkin:fix_mod_with_multilevel_paths_on_windows, ↵bors-0/+49
r=nikomatsakis Fix processing mod with multi-level path on Windows Fix error in [rustfmt](https://github.com/rust-lang-nursery/rustfmt/issues/1754) because libsyntax can not handle `mod` with multilevel path on Windows. Alternative is do almost same in https://github.com/rust-lang/rust/blob/master/src/libstd/sys/windows/fs.rs#L717 to allow work on paths with different separators, Ex. "\\\\?\\c:\\windows/temp"
2018-06-18Add ability to apply custom derive to union types.Steve Pentland-0/+52
The Union item type has been included in the allowed types for a custom derive. Closes #50223
2018-06-18Auto merge of #51248 - fabric-and-ink:newtype_index_debrujin, r=nikomatsakisbors-15/+15
Declare DebruijnIndex via newtype_index macro Part of #49887 Declare `DebruijnIndex` via the `newtype_index` macro.
2018-06-18Rename OOM to allocation errorSimon Sapin-7/+11
The acronym is not descriptive unless one has seen it before. * Rename the `oom` function to `handle_alloc_error`. It was **stabilized in 1.28**, so if we do this at all we need to land it this cycle. * Rename `set_oom_hook` to `set_alloc_error_hook` * Rename `take_oom_hook` to `take_alloc_error_hook` Bikeshed: `alloc` v.s. `allocator`, `error` v.s. `failure`
2018-06-18Auto merge of #51460 - nikomatsakis:nll-perf-examination-refactor-1, r=pnkfelixbors-8/+6
Improve memoization and refactor NLL type check I have a big branch that is refactoring NLL type check with the goal of introducing canonicalization-based memoization for all of the operations it does. This PR contains an initial prefix of that branch which, I believe, stands alone. It does introduce a few smaller optimizations of its own: - Skip operations that are trivially a no-op - Cache the results of the dropck-outlives computations done by liveness - Skip resetting unifications if nothing changed r? @pnkfelix
2018-06-18Auto merge of #51414 - oli-obk:impl_trait_type_def, r=pnkfelixbors-114/+300
Add existential type definitions Note: this does not allow creating named existential types, it just desugars `impl Trait` to a less (but still very) hacky version of actual `existential type` items. r? @nikomatsakis
2018-06-17Auto merge of #51392 - glaubitz:powerpc-tests, r=petrochenkovbors-8/+32
test: Ignore some problematic tests on powerpc and powerpc64* This updates the list of tests which can be safely ignored on powerpc and powerpc64*.
2018-06-17test: Ignore some problematic tests on powerpc and powerpc64*John Paul Adrian Glaubitz-8/+32
2018-06-17Auto merge of #51425 - QuietMisdreavus:thats-def-a-namespace-there, ↵bors-0/+26
r=petrochenkov refactor: create multiple HIR items for imports When lowering `use` statements into HIR, they get a `Def` of the thing they're pointing at. This is great for things that need to know what was just pulled into scope. However, this is a bit misleading, because a `use` statement can pull things from multiple namespaces if their names collide. This is a problem for rustdoc, because if there are a module and a function with the same name (for example) then it will only document the module import, because that's that the lowered `use` statement points to. The current version of this PR does the following: * Whenever the resolver comes across a `use` statement, it loads the definitions into a new `import_map` instead of the existing `def_map`. This keeps the resolutions per-namespace so that all the target definitions are available. * When lowering `use` statements, it looks up the resolutions in the `import_map` and creates multiple `Item`s if there is more than one resolution. * To ensure the `NodeId`s are properly tracked in the lowered module, they need to be created in the AST, and pulled out as needed if multiple resolutions are available. Fixes https://github.com/rust-lang/rust/issues/34843
2018-06-17Auto merge of #51382 - GuillaumeGomez:intra-link-lint, r=QuietMisdreavusbors-2/+50
Add lint for intra link resolution failure This PR is almost done, just remains this note: ``` note: requested on the command line with `-W intra-link-resolution-failure` ``` I have no idea why my lint is considered as being passed through command line and wasn't able to find where it was set. If anyone has an idea, it'd be very helpful! cc @QuietMisdreavus
2018-06-16Auto merge of #51594 - eddyb:issue-51582, r=nagisabors-0/+27
rustc_codegen_llvm: don't treat i1 as signed, even for #[repr(i8)] enums. Fixes #51582. r? @nagisa cc @nox @oli-obk
2018-06-16Auto merge of #51584 - QuietMisdreavus:globs-and-crosses, r=ollie27bors-0/+36
rustdoc: process cross-crate glob re-exports Turns out, we were deliberately ignoring glob re-exports when they were occurring across crates, even though we were fully processing them for local re-exports. This will at least bring the two into parity. Fixes https://github.com/rust-lang/rust/issues/51252
2018-06-16rustc_codegen_llvm: don't treat i1 as signed, even for #[repr(i8)] enums.Eduard-Mihai Burtescu-0/+27
2018-06-16Auto merge of #51562 - SimonSapin:transparent, r=cramertjbors-35/+3
Stabilize #[repr(transparent)] Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318 Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-06-16Auto merge of #51550 - eddyb:queries-not-maps, r=nikomatsakisbors-1/+1
rustc: rename ty::maps to ty::query. Should've never been `maps` but "query system/engine" didn't fully settle from the start. r? @michaelwoerister or @nikomatsakis
2018-06-15process cross-crate glob re-exportsQuietMisdreavus-0/+36