about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-01-13Rollup merge of #57564 - varkor:update-const_fn-tracking-issue, r=CentrilMazdak Farrokhzad-4/+4
Update the const fn tracking issue to the new metabug The new `const fn` tracking issue is #57563. We don't want to point to a closed issue in the diagnostics (or FIXMEs), so these have been updated (from the old issue, #24111). r? @Centril
2019-01-13Rollup merge of #57560 - petrochenkov:selfinmac, r=alexregMazdak Farrokhzad-0/+21
hygiene: Do not treat `Self` ctor as a local variable Fixes https://github.com/rust-lang/rust/issues/57523
2019-01-13Rollup merge of #57557 - petrochenkov:ecused, r=varkorMazdak Farrokhzad-0/+66
resolve: Mark extern crate items as used in more cases Fixes https://github.com/rust-lang/rust/issues/57421
2019-01-13Rollup merge of #57508 - DebugSteven:inline-extern, r=GuillaumeGomezMazdak Farrokhzad-0/+11
rustdoc: Allow inlining of reexported crates and crate items Fixes #46296 This PR checks for when a `pub extern crate` statement has a `#[doc(inline)]` attribute & inlines its contents. Code is based off of the inlining statements for `pub use` statements.
2019-01-13Rollup merge of #57412 - JohnTitor:improve-the-wording-1, r=varkorMazdak Farrokhzad-45/+45
Improve the wording I'm sorry but re-opened the PR because I failed to squash commits(#57397). Fixes #55752. r? @varkor
2019-01-13Update the const fn tracking issue to the new metabugvarkor-4/+4
2019-01-13hygiene: Do not treat `Self` ctor as a local variableVadim Petrochenkov-0/+21
2019-01-13resolve: Mark extern crate items as used in more casesVadim Petrochenkov-0/+66
2019-01-12Auto merge of #56759 - petrochenkov:prestabuni, r=nikomatsakisbors-236/+158
Stabilize `uniform_paths` Address all the things described in https://github.com/rust-lang/rust/issues/56417. Assign visibilities to `macro_rules` items - `pub` to `macro_export`-ed macros and `pub(crate)` to non-exported macros, these visibilities determine how far these macros can be reexported with `use`. Prohibit use of reexported inert attributes and "tool modules", after renaming (e.g. `use inline as imported_inline`) their respective tools and even compiler passes won't be able to recognize and properly check them. Also turn use of uniform paths in 2015 macros into an error, I'd prefer to neither remove nor stabilize them right away because I still want to make some experiments in this area (uniform path fallback was added to 2015 macros used on 2018 edition in https://github.com/rust-lang/rust/pull/56053#issuecomment-441405140). UPDATE: The last commit also stabilizes the feature `uniform_paths`. Closes https://github.com/rust-lang/rust/issues/53130 Closes https://github.com/rust-lang/rust/issues/55618 Closes https://github.com/rust-lang/rust/issues/56326 Closes https://github.com/rust-lang/rust/issues/56398 Closes https://github.com/rust-lang/rust/issues/56417 Closes https://github.com/rust-lang/rust/issues/56821 Closes https://github.com/rust-lang/rust/issues/57252 Closes https://github.com/rust-lang/rust/issues/57422
2019-01-12Fix a hole in generic parameter import future-proofingVadim Petrochenkov-7/+42
Add some tests for buggy derive helpers
2019-01-12Stabilize `uniform_paths`Vadim Petrochenkov-191/+48
2019-01-12resolve: Prohibit use of imported tool modulesVadim Petrochenkov-6/+44
2019-01-12resolve: Prohibit use of imported non-macro attributesVadim Petrochenkov-4/+23
2019-01-12resolve: Prohibit use of uniform paths in macros originating from 2015 editionVadim Petrochenkov-1/+1
...while still keeping ambiguity errors future-proofing for uniform paths. This corner case is not going to be stabilized for 1.32 and needs some more general experiments about retrofitting 2018 import rules to 2015 edition
2019-01-12resolve: Assign `pub` and `pub(crate)` visibilities to `macro_rules` itemsVadim Petrochenkov-40/+13
2019-01-12Auto merge of #57542 - Centril:rollup, r=Centrilbors-951/+537
Rollup of 26 pull requests Successful merges: - #56425 (Redo the docs for Vec::set_len) - #56906 (Issue #56905) - #57042 (Don't call `FieldPlacement::count` when count is too large) - #57175 (Stabilize `let` bindings and destructuring in constants and const fn) - #57192 (Change std::error::Error trait documentation to talk about `source` instead of `cause`) - #57296 (Fixed the link to the ? operator) - #57368 (Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache) - #57400 (Rustdoc: update Source Serif Pro and replace Heuristica italic) - #57417 (rustdoc: use text-based doctest parsing if a macro is wrapping main) - #57433 (Add link destination for `read-ownership`) - #57434 (Remove `CrateNum::Invalid`.) - #57441 (Supporting backtrace for x86_64-fortanix-unknown-sgx.) - #57450 (actually take a slice in this example) - #57459 (Reference tracking issue for inherent associated types in diagnostic) - #57463 (docs: Fix some 'second-edition' links) - #57466 (Remove outdated comment) - #57493 (use structured suggestion when casting a reference) - #57498 (make note of one more normalization that Paths do) - #57499 (note that FromStr does not work for borrowed types) - #57505 (Remove submodule step from README) - #57510 (Add a profiles section to the manifest) - #57511 (Fix undefined behavior) - #57519 (Correct RELEASES.md for 1.32.0) - #57522 (don't unwrap unexpected tokens in `format!`) - #57530 (Fixing a typographical error.) - #57535 (Stabilise irrefutable if-let and while-let patterns) Failed merges: r? @ghost
2019-01-12Rollup merge of #57535 - varkor:stabilise-if-while-let-patterns, r=CentrilMazdak Farrokhzad-168/+155
Stabilise irrefutable if-let and while-let patterns This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). This replaces https://github.com/rust-lang/rust/pull/55639, as we want to stabilise this in time for the beta cut-off. Closes https://github.com/rust-lang/rust/pull/55639. r? @Centril
2019-01-12Rollup merge of #57522 - euclio:format-ice, r=varkorMazdak Farrokhzad-4/+11
don't unwrap unexpected tokens in `format!` Fixes #57512.
2019-01-12Rollup merge of #57493 - euclio:deref-suggest, r=oli-obkMazdak Farrokhzad-21/+12
use structured suggestion when casting a reference
2019-01-12Rollup merge of #57459 - varkor:E0202-issue-reference, r=petrochenkovMazdak Farrokhzad-6/+6
Reference tracking issue for inherent associated types in diagnostic This makes it clearer that associated types in inherent impls are an intended feature, like the diagnostic for equality constraints in where clauses. (This is more helpful, because the lack of associated types is a confusing omission and it lets users more easily track the state of the feature.)
2019-01-12Rollup merge of #57175 - oli-obk:const_let_stabilization, r=nikomatsakisMazdak Farrokhzad-752/+353
Stabilize `let` bindings and destructuring in constants and const fn r? @Centril This PR stabilizes the following features in constants and `const` functions: * irrefutable destructuring patterns (e.g. `const fn foo((x, y): (u8, u8)) { ... }`) * `let` bindings (e.g. `let x = 1;`) * mutable `let` bindings (e.g. `let mut x = 1;`) * assignment (e.g. `x = y`) and assignment operator (e.g. `x += y`) expressions, even where the assignment target is a projection (e.g. a struct field or index operation like `x[3] = 42`) * expression statements (e.g. `3;`) This PR does explicitly *not* stabilize: * mutable references (i.e. `&mut T`) * dereferencing mutable references * refutable patterns (e.g. `Some(x)`) * operations on `UnsafeCell` types (as that would need raw pointers and mutable references and such, not because it is explicitly forbidden. We can't explicitly forbid it as such values are OK as long as they aren't mutated.) * We are not stabilizing `let` bindings in constants that use `&&` and `||` short circuiting operations. These are treated as `&` and `|` inside `const` and `static` items right now. If we stopped treating them as `&` and `|` after stabilizing `let` bindings, we'd break code like `let mut x = false; false && { x = true; false };`. So to use `let` bindings in constants you need to change `&&` and `||` to `&` and `|` respectively.
2019-01-12const_let: --bless with --compare-mode=nllMazdak Farrokhzad-77/+74
2019-01-12Auto merge of #57532 - Centril:stabilize-2175, r=varkorbors-32/+12
Stabilize #![feature(if_while_or_patterns)] r? @varkor Per https://github.com/rust-lang/rust/issues/56212#issue-384085857. Leading `|` is also accepted per the comment in the stabilization proposal.
2019-01-12bless ui/while-letMazdak Farrokhzad-0/+1
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-10add test for pub extern crateDebugSteven-0/+11
2019-01-10use structured suggestion when casting a referenceAndy Russell-21/+12
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-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