about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-12-06Auto merge of #56392 - petrochenkov:regensym, r=oli-obkbors-28/+126
Delay gensym creation for "underscore items" (`use foo as _`/`const _`) until name resolution So they cannot be cloned by macros. See https://github.com/rust-lang/rust/pull/56303 for the discussion. Mostly fix cross-crate use of underscore items by inverting the "gensyms are lost in metadata" bug as described in https://github.com/rust-lang/rust/pull/56303#issuecomment-442464695. Fix unused import warnings for single-segment imports (first commit) and `use crate_name as _` imports (as specified in https://github.com/rust-lang/rust/pull/56303#issuecomment-442274118). Prohibit accidentally implemented `static _: TYPE = EXPR;` (cc https://github.com/rust-lang/rust/pull/55983). Add more tests for `use foo as _` imports.
2018-12-06Add test for #46589.David Wood-0/+66
This commit adds the test for writing into a projection of a local to confirm there are no remaining borrows.
2018-12-06Auto merge of #56557 - pietroalbini:rollup, r=pietroalbinibors-79/+232
Rollup of 11 pull requests Successful merges: - #56315 (Rustdoc inline macro reexport) - #56332 ([rustdoc] Specific crate search) - #56362 (Stabilise exhaustive integer patterns) - #56426 (libsyntax_pos: A few tweaks) - #56441 (rustbuild: Fix issues with compiler docs) - #56446 (pass the parameter environment to `traits::find_associated_item`) - #56500 (cleanup: remove static lifetimes from consts) - #56525 (Avoid extra copy and syscall in std::env::current_exe) - #56528 (Remove unused dependency (rustc_lint -> rustc_mir)) - #56548 (Optimized string FromIterator + Extend impls) - #56553 (Don't print the profiling summary to stdout when -Zprofile-json is set) Failed merges: r? @ghost
2018-12-06Auto merge of #55635 - oli-obk:min_const_unsafe_fn, r=nikomatsakisbors-37/+560
Allow calling `const unsafe fn` in `const fn` behind a feature gate cc #55607 r? @Centril
2018-12-06Rollup merge of #56446 - arielb1:special-env-implications, r=nikomatsakisPietro Albini-0/+38
pass the parameter environment to `traits::find_associated_item` dropping the param-env on the floor is obviously the wrong thing to do. The ICE was probably exposed by #54490 adding the problem-exposing use of `traits::find_associated_item`. Fixes #55380. r? @nikomatsakis
2018-12-06Rollup merge of #56426 - petrochenkov:syntweak, r=nikomatsakisPietro Albini-4/+4
libsyntax_pos: A few tweaks
2018-12-06Rollup merge of #56362 - varkor:stabilise-exhaustive-integer-patterns, ↵Pietro Albini-85/+153
r=nikomatsakis Stabilise exhaustive integer patterns This is dependent on the FCP for https://github.com/rust-lang/rfcs/pull/2591 being completed, but that should happen tomorrow, so there's little harm in opening this PR early. Closes #50907.
2018-12-06Rollup merge of #56332 - GuillaumeGomez:specifi-crate-search, r=QuietMisdreavusPietro Albini-0/+19
[rustdoc] Specific crate search Reopening of #54706. Fixes #54616. <img width="1440" alt="screenshot 2018-11-29 at 01 29 11" src="https://user-images.githubusercontent.com/3050060/49191372-979adf80-f376-11e8-963e-e4feb927c1da.png"> r? @QuietMisdreavus
2018-12-06Rollup merge of #56315 - weiznich:rustdoc_inline_macro_reexport, ↵Pietro Albini-0/+28
r=QuietMisdreavus Rustdoc inline macro reexport Fixes #56173 I assume this needs to have tests? Any pointers where these need to be added?
2018-12-06Auto merge of #54517 - mcr431:53956-panic-on-include_bytes-of-own-file, ↵bors-6/+9
r=michaelwoerister 53956 panic on include bytes of own file fix #53956 When using `include_bytes!` on a source file in the project, compiler would panic on subsequent compilations because `expand_include_bytes` would overwrite files in the source_map with no source. This PR changes `expand_include_bytes` to check source_map and use the already existing src, if any.
2018-12-05Auto merge of #56549 - pietroalbini:rollup, r=pietroalbinibors-12/+22
Rollup of 15 pull requests Successful merges: - #51753 (Document `From` implementations) - #55563 (Improve no result found sentence in doc search) - #55987 (Add Weak.ptr_eq) - #56119 (Utilize `?` instead of `return None`.) - #56372 (Refer to the second borrow as the "second borrow" in E0501.rs) - #56388 (More MIR borrow check cleanup) - #56424 (Mention raw-ident syntax) - #56452 (Remove redundant clones) - #56456 (Handle existential types in dead code analysis) - #56466 (data_structures: remove tuple_slice) - #56476 (Fix invalid line number match) - #56497 (cleanup: remove static lifetimes from consts in libstd) - #56498 (Fix line numbers display) - #56523 (Added a bare-bones eslint config (removing jslint)) - #56538 (Use inner iterator may_have_side_effect for Cloned) Failed merges: r? @ghost
2018-12-05Rollup merge of #56456 - oli-obk:private_impl_trait, r=cramertjPietro Albini-0/+13
Handle existential types in dead code analysis fixes #55124 r? @cramertj
2018-12-05Rollup merge of #56372 - wildarch:issue-55314-second-borrow-ref, r=davidtwcoPietro Albini-8/+8
Refer to the second borrow as the "second borrow" in E0501.rs Fixes #55314. r? @davidtwco
2018-12-05Rollup merge of #56119 - frewsxcv:frewsxcv-option-carrier, r=TimNNPietro Albini-4/+1
Utilize `?` instead of `return None`. None
2018-12-05Fix precise_pointer_size_matching tests on all platformsvarkor-6/+13
2018-12-05Auto merge of #55933 - euclio:doc-panic, r=QuietMisdreavusbors-0/+26
emit error when doc generation fails Fixes #41813. The diagnostic looks something like this: ``` error: couldn't generate documentation: No space left on device (os error 28) | = note: failed to create or modify "/path/to/crate/target/doc/src/lazycell" ```
2018-12-05emit error when doc generation failsAndy Russell-0/+26
Fixes #41813.
2018-12-05Auto merge of #55466 - sinkuu:cleanup, r=petrochenkovbors-1/+0
syntax: Use iterator and pattern APIs instead of `char_at` Iterating over chars with the `char_at(str, i)` `i += ch.len_utf8()` loop seems unidiomatic.
2018-12-05Auto merge of #55922 - oli-obk:slice_pat_ice, r=zackmdavisbors-0/+72
Fix ICE in `const` slice patterns fixes #55911 based on https://github.com/rust-lang/rust/pull/55915 New commits start at eabc1551e0d0953f1951020afb5919ab4c129cf5
2018-12-04adds DocTest filename variant, refactors doctest_offset out of source_map, ↵Matthew Russo-3/+4
fixes remaining test failures
2018-12-04updates all Filename variants to take a fingerprintMatthew Russo-3/+5
2018-12-04Auto merge of #56486 - matthewjasper:propagate-all-closure-bounds, r=pnkfelixbors-0/+42
Propagate all closure requirements to the caller Closes #56477 This should be backported to 1.32 if it doesn't make the cut. r? @pnkfelix cc @nikomatsakis
2018-12-04Utilize `?` instead of `return None`.Corey Farwell-4/+1
2018-12-04Auto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakisbors-333/+432
Report failing tests without `//~ ERROR` comments r? @nikomatsakis
2018-12-04emit error with span for empty assertsAndy Russell-0/+20
Fixes #55547.
2018-12-04Add a test case for inlining the docs of a macro reexportGeorg Semmler-0/+28
2018-12-04Intrinsic checks are just needed for `qualify_min_const_fn`Oliver Scherer-0/+8
2018-12-04Add and update testsOliver Scherer-54/+57
2018-12-04Add tests for stable unsafe features in const fnOliver Scherer-0/+158
2018-12-04Emit feature gate suggestionOliver Scherer-15/+15
2018-12-04Also prevent mutation fields directlyOliver Scherer-10/+30
2018-12-04Also make immutable references to non-freeze restricted value range types unsafeOliver Scherer-0/+22
2018-12-04generalize the message about the creation of layout restricted typesOliver Scherer-1/+1
2018-12-04Adjust a rustc test to the safety changesOliver Scherer-1/+2
2018-12-04Trailing newlines againOliver Scherer-2/+2
2018-12-04Forbid the creation of mutable borrows to fields of layout constrained typesOliver Scherer-0/+39
2018-12-04Make sure the initialization of constrained int range newtypes is unsafeOliver Scherer-0/+136
2018-12-04Add test for dereferencing raw pointers and immediately referencing againOliver Scherer-3/+22
2018-12-04Allow calling `const unsafe fn` in `const fn` behind a feature gateOliver Scherer-7/+124
2018-12-04Update doc-ui testsOliver Scherer-5/+11
2018-12-04Update ui testsOliver Scherer-28/+29
2018-12-04Remove unused stderr fileOliver Scherer-49/+0
2018-12-04Newlines.... newlines everywhereOliver Scherer-1/+1
2018-12-04Add a test ensuring that we don't regress thisOliver Scherer-0/+6
2018-12-04Update testsOliver Scherer-252/+387
2018-12-04Auto merge of #55707 - GuillaumeGomez:file-sidebar, r=QuietMisdreavusbors-0/+15
Add source file sidebar This is just a start currently but that gives a good overview of what it'll look like: <img width="1440" alt="screenshot 2018-11-06 at 01 39 15" src="https://user-images.githubusercontent.com/3050060/48035592-05336180-e165-11e8-82e1-5ead0c345eb9.png"> r? @QuietMisdreavus
2018-12-04Auto merge of #55682 - GuillaumeGomez:primitive-sidebar-link-gen, ↵bors-0/+23
r=QuietMisdreavus Fixes primitive sidebar link generation Fixes #50746. Fixes #55656. r? @QuietMisdreavus
2018-12-04Fix testShotaro Yamada-1/+0
2018-12-03Propagate all closure requirements to the callerMatthew Jasper-0/+42
2018-12-03Fix stderr file (unused variable)John Ginger-0/+1