about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-01-11Continue parsing after lifetime in incorrect locationEsteban Küber-5/+49
2019-01-11Continue parser after trailing type argument attributeEsteban Küber-6/+14
2019-01-12Stabilise irrefutable if-let and while-let patternsvarkor-168/+154
This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). Co-Authored-By: Sebastian Malton <sebastian@malton.name>
2019-01-12Auto merge of #57234 - Centril:const-stabilizations-2, r=oli-obkbors-136/+542
Const-stabilize `const_int_ops` + `const_ip` r? @oli-obk ## Note for relnotes: This PR includes https://github.com/rust-lang/rust/pull/57105. I've added T-lang since this affects intrinsics and the operational semantics of Rust's `const fn` fragment. ## Stable APIs proposed for constification + `const_int_ops`: + `count_ones` + `count_zeros` + `leading_zeros` + `trailing_zeros` + `swap_bytes` + `from_be` + `from_le` + `to_be` + `to_le` + `const_ip` + `Ipv4Addr::new` ## Unstable APIs constified + `const_int_conversion`: + `reverse_bits`
2019-01-11stabilize top level or-pats in if/while let.Mazdak Farrokhzad-32/+12
2019-01-11don't unwrap unexpected tokens in `format!`Andy Russell-4/+11
Fixes #57512.
2019-01-11Auto merge of #57355 - arielb1:correct-subst, r=nikomatsakisbors-0/+23
use the correct supertrait substitution in `object_ty_for_trait` beta-nominating because regression. Fixes #57156.
2019-01-11Update testsJohn Kåre Alsaker-36/+181
2019-01-10add test for pub extern crateDebugSteven-0/+11
2019-01-10new trait alias testsNiko Matsakis-0/+122
Co-authored-by: Alexander Regueiro <alexreg@me.com>
2019-01-10use structured suggestion when casting a referenceAndy Russell-21/+12
2019-01-09provide suggestion for invalid boolean castAndy Russell-20/+25
Also, don't suggest comparing to zero for non-numeric expressions.
2019-01-09clarify resolve typo suggestionAndy Russell-106/+178
Include the kind of the binding that we're suggesting, and use a structured suggestion.
2019-01-09Fix irrefutable slice patterns in const fnOliver Scherer-0/+25
2019-01-09const fn feature gate is not needed anymore in a lot of testsOliver Scherer-37/+38
2019-01-09Stabilize `let` bindings and destructuring in constants and const fnOliver Scherer-654/+232
2019-01-08Consolidate equality constraints error messagevarkor-2/+2
2019-01-08Add issue reference to E0202 messagevarkor-4/+4
2019-01-08Auto merge of #56407 - GuillaumeGomez:missing-docs-reexported-macros, r=varkorbors-0/+67
check missing docs for reexported macros as well Fixes #56334.
2019-01-08improve non_camel_case_types diagnosticsAndy Russell-68/+64
Use a structured suggestion and tighten the span to just the identifier.
2019-01-08improve non_upper_case_globals diagnosticsAndy Russell-62/+60
Use a structured suggestion and tighten the span to just the identifier.
2019-01-08improve non_snake_case diagnosticsAndy Russell-120/+96
Use a structured suggestion and tighten the span to just the identifier.
2019-01-08Auto merge of #57332 - Dylan-DPC:feature/stabilise-cfg-attr, r=Centrilbors-64/+12
stabilize cfg_attr_multi Stabilizes cfg_attr_multi feature Related to #54881 Will add the lint in a seperate PR r? @Centril
2019-01-08bless youdylan_DPC-2/+2
2019-01-08remove unwanted stage0 line, fix styledylan_DPC-7/+5
2019-01-08remove unused imports and feature gate from testsdylan_DPC-7/+5
2019-01-08stabilise cfg_attrdylan_DPC-51/+3
2019-01-08Improve the wordingYuki Okushi-45/+45
2019-01-07Auto merge of #57405 - pietroalbini:rollup, r=pietroalbinibors-1/+1
Rollup of 6 pull requests Successful merges: - #57290 (remove outdated comment) - #57308 (Make CompileController thread-safe) - #57358 (use utf-8 throughout htmldocck) - #57369 (Provide the option to use libc++ even on all platforms) - #57375 (Add duration constants) - #57403 (Make extern ref HTTPS) Failed merges: - #57370 (Support passing cflags/cxxflags/ldflags to LLVM build) r? @ghost
2019-01-07Rollup merge of #57358 - euclio:docck-unicode, r=QuietMisdreavusPietro Albini-1/+1
use utf-8 throughout htmldocck This commit improves compatibility with Python 3, which already uses Unicode throughout. It also fixes a subtle incompatibility stemming from the use of `entitydefs`, which contains replacement text _encoded in latin-1_ for HTML entities. When using Python 3, this would cause `0xa0` to be incorrectly added to the element tree. This meant that there was a rustdoc test that would pass under Python 2 but fail under Python 3, due to an incorrect regex match against the non-breaking space character. This commit triggers that failure in both versions, and also fixes it.
2019-01-07Auto merge of #57304 - davidtwco:issue-57280, r=nikomatsakisbors-0/+43
NLL: Fix bug in associated constant type annotations. Fixes #57280. This PR reverses the variance used when relating types from the type annotation of an associated constant - this matches the behaviour of the lexical borrow checker and fixes a bug whereby matching a `&'a str` against a `&'static str` would produce an error. r? @nikomatsakis
2019-01-07Auto merge of #57379 - petrochenkov:parsrecov, r=estebankbors-879/+749
tests: Do not use `-Z parse-only`, continue compilation to test recovery Make tests closer to reality! The next step will be enabling `-Z continue-parse-after-error` by default and looking at the regressions. A few instances of `-Z parse-only` are kept when it's appropriate, see e.g `ui/impl-trait/impl-trait-plus-priority.rs`, which tests mostly semantically wrong code and would generate too much useless noise if allowed to continue.
2019-01-06Auto merge of #57344 - petrochenkov:regreach, r=arielb1bors-0/+37
privacy: Fix regression in impl reachability Rollback to pre-https://github.com/rust-lang/rust/pull/56878 logic of determining reachability. `reachability(impl Trait<Substs> for Type<Substs>) = reachability(Trait & Type)`, substs are ignored. Fixes https://github.com/rust-lang/rust/issues/57264
2019-01-06tests: Do not use `-Z parse-only`, continue compilation to test recoveryVadim Petrochenkov-879/+749
2019-01-06check missing docs for reexported macros as wellGuillaume Gomez-0/+67
2019-01-06Auto merge of #57272 - petrochenkov:featrecov, r=estebankbors-175/+297
Make sure feature gate errors are recoverable (take 2) Continuation of https://github.com/rust-lang/rust/pull/56999/commits/15cefe4b2a65bb2a4febcd353cb37b90dfafa4f1. Turns out I missed the most important part - the main feature gate checking pass.
2019-01-06Fix CI failuresVadim Petrochenkov-63/+64
2019-01-06Make sure feature gate errors are recoverable (take 2)Vadim Petrochenkov-112/+233
2019-01-06Auto merge of #57291 - euclio:method-call-suggestion, r=estebankbors-33/+33
use structured suggestion for method calls Furthermore, don't suggest calling the method if it is part of a place expression, as this is invalid syntax. I'm thinking it might be worth putting a label on the method assignment span like "this is a method" and removing the span from the "methods are immutable" text so it isn't reported twice. The suggestions in `src/test/ui/did_you_mean/issue-40396.stderr` are suboptimal. I could check if the containing expression is `BinOp`, but I'm not sure if that's general enough. Any ideas? r? @estebank
2019-01-06use utf-8 throughout htmldocckAndy Russell-1/+1
This commit improves compatibility with Python 3, which already uses Unicode throughout. It also fixes a subtle incompatibility stemming from the use of `entitydefs`, which contains replacement text _encoded in latin-1_ for HTML entities. When using Python 3, this would cause `0xa0` to be incorrectly added to the element tree. This meant that there was a rustdoc test that would pass under Python 2 but fail under Python 3, due to an incorrect regex match against the non-breaking space character. This commit triggers that failure in both versions, and also fixes it.
2019-01-06Auto merge of #57286 - alexcrichton:less-thin-2-2, r=nikomatsakisbors-141/+0
bootstrap: Link LLVM as a dylib with ThinLTO (take 2) When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334 --- This PR previously landed in https://github.com/rust-lang/rust/pull/56944, caused https://github.com/rust-lang/rust/issues/57111, and was reverted in https://github.com/rust-lang/rust/pull/57116. I've added one more commit here which should fix the breakage that we saw.
2019-01-05Auto merge of #57230 - estebank:return-mismatch, r=varkorbors-112/+112
Modify mismatched type error for functions with no return Fix #50009. ``` error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:3:24 | LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types | -------- ^^^ expected i32, found () | | | this function's body doesn't return LL | x + 1; | - help: consider removing this semicolon | = note: expected type `i32` found type `()` ``` instead of ``` error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:3:28 | LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types | ____________________________^ LL | | x + 1; | | - help: consider removing this semicolon LL | | } | |_^ expected i32, found () | = note: expected type `i32` found type `()` ```
2019-01-05privacy: Mark everything in a header of a reachable impl as reachableVadim Petrochenkov-8/+28
2019-01-05privacy: Fix regression in impl reachabilityVadim Petrochenkov-0/+17
2019-01-05Auto merge of #57354 - kennytm:rollup, r=kennytmbors-165/+184
Rollup of 17 pull requests Successful merges: - #57219 (Remove some unused code) - #57229 (Fix #56806 by using `delay_span_bug` in object safety layout sanity checks) - #57233 (Rename and fix nolink-with-link-args test) - #57238 (Fix backtraces for inlined functions on Windows) - #57249 (Fix broken links to second edition TRPL.) - #57267 (src/jemalloc is gone, remove its mention from COPYRIGHT) - #57273 (Update the stdsimd submodule) - #57278 (Add Clippy to config.toml.example) - #57295 (Fix 'be be' constructs) - #57311 (VaList::copy should not require a mutable ref) - #57312 (`const fn` is no longer coming soon (const keyword docs)) - #57313 (Improve Box<T> -> Pin<Box<T>> conversion) - #57314 (Fix repeated word typos) - #57326 (Doc rewording, use the same name `writer`) - #57338 (rustdoc: force binary filename for compiled doctests) - #57342 (librustc_mir: Make qualify_min_const_fn module public) - #57343 (Calculate privacy access only via query) Failed merges: - #57340 (Use correct tracking issue for c_variadic) r? @ghost
2019-01-05use the correct supertrait substitution in `object_ty_for_trait`Ariel Ben-Yehuda-0/+23
Fixes #57156.
2019-01-05Rollup merge of #57338 - QuietMisdreavus:doctest-file-name, r=GuillaumeGomezkennytm-0/+7
rustdoc: force binary filename for compiled doctests Fixes https://github.com/rust-lang/rust/issues/57317, needed for https://github.com/rust-lang/rust-by-example/issues/1137 Right now, when building a doctest, rustdoc provides the compiler an output directory (a temp dir) but lets the compiler name the executable. If the doctest needs to be executed, it then tries to run a binary named `rust_out` from that directory. For the most part, this works fine. However, if the doctest sets its own crate name, the compiler uses that name for the output binary instead. This causes rustdoc to try to execute a nonexistent binary, causing the test to fail. This PR changes the paths rustdoc gives to the compiler when building doctests to force the output *filename* instead of just the *directory*.
2019-01-05Rollup merge of #57314 - wiktorkuchta:master, r=Centrilkennytm-2/+2
Fix repeated word typos Inspired by #57295 (I skipped 'be be' because of it) and my [PR in another repo ](https://github.com/e-maxx-eng/e-maxx-eng/pull/389) Not a stupid `sed`, I actually tried to fix case by case.
2019-01-05Rollup merge of #57249 - frewsxcv:frewsxcv-second-edition, r=KodrAuskennytm-135/+135
Fix broken links to second edition TRPL. Fixes https://github.com/rust-lang/rust/issues/57104. Remove `second-edition/` from TRPL hyperlinks.
2019-01-05Rollup merge of #57233 - Smibu:rename-and-fix-nolink-test, r=alexcrichtonkennytm-13/+12
Rename and fix nolink-with-link-args test There are three problems with the nolink-with-link-args test: * The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in #46291. * In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](https://github.com/rust-lang/rust/pull/12826). * Pattern has a small typo. At first I was going to completely remove this test, but there is [a closed pull request for that](https://github.com/rust-lang/rust/pull/21090). So: * rename the file as suggested in the closed PR * adjust the comment * fix typo in the pattern * add `ignore-msvc`. r? @alexcrichton