summary refs log tree commit diff
path: root/src/test/auxiliary
AgeCommit message (Collapse)AuthorLines
2016-01-15Preserve struct/variant kinds in metadataVadim Petrochenkov-0/+19
Add tests for use of empty structs in cross-crate scenarios
2016-01-13Simplify some uses of cfg in test casesAnton Blanchard-2/+1
While adding PowerPC64 support it was noticed that some testcases should just use target_pointer_width, and others should select between x86 and !x86.
2016-01-13Add powerpc64 and powerpc64le supportAnton Blanchard-1/+2
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2016-01-04Feature-gate defaulted type parameters outside of types.Niko Matsakis-0/+1
2015-12-18Auto merge of #30389 - nikomatsakis:rfc1214-error, r=arielb1bors-2/+2
Make RFC 1214 warnings into errors, and rip out the "warn or err" associated machinery. Future such attempts should go through lints anyhow. There is a fair amount of fallout in the compile-fail tests, as WF checking now occurs earlier in the process. r? @arielb1
2015-12-18Auto merge of #29973 - petrochenkov:privinpub, r=nikomatsakisbors-2/+2
Some notes: This patch enforces the rules from [RFC 136](https://github.com/rust-lang/rfcs/blob/master/text/0136-no-privates-in-public.md) and makes "private in public" a module-level concept and not crate-level. Only `pub` annotations are used by the new algorithm, crate-level exported node set produced by `EmbargoVisitor` is not used. The error messages are tweaked accordingly and don't use the word "exported" to avoid confusing people (https://github.com/rust-lang/rust/issues/29668). The old algorithm tried to be extra smart with impls, but it mostly led to unpredictable behavior and bugs like https://github.com/rust-lang/rust/issues/28325. The new algorithm tries to be as simple as possible - an impl is considered public iff its type is public and its trait is public (if presents). A type or trait is considered public if all its components are public, [complications](https://internals.rust-lang.org/t/limits-of-type-inference-smartness/2919) with private types leaking to other crates/modules through trait impls and type inference are deliberately ignored so far. The new algorithm is not recursive and uses the nice new facility `Crate::visit_all_items`! Obsolete pre-1.0 feature `visible_private_types` is removed. This is a [breaking-change]. The two main vectors of breakage are type aliases (https://github.com/rust-lang/rust/issues/28450) and impls (https://github.com/rust-lang/rust/issues/28325). I need some statistics from a crater run (cc @alexcrichton) to decide on the breakage mitigation strategy. UPDATE: All the new errors are reported as warnings controlled by a lint `private_in_public` and lint group `future_incompatible`, but the intent is to make them hard errors eventually. Closes https://github.com/rust-lang/rust/issues/28325 Closes https://github.com/rust-lang/rust/issues/28450 Closes https://github.com/rust-lang/rust/issues/29524 Closes https://github.com/rust-lang/rust/issues/29627 Closes https://github.com/rust-lang/rust/issues/29668 Closes https://github.com/rust-lang/rust/issues/30055 r? @nikomatsakis
2015-12-18Make RFC 1214 warnings into errors, and rip out the "warn or err"Niko Matsakis-2/+2
associated machinery. Future such attempts should go through lints anyhow. There is a fair amount of fallout in the compile-fail tests, as WF checking now occurs earlier in the process.
2015-12-18Fix the falloutVadim Petrochenkov-2/+2
2015-12-18Auto merge of #29907 - nagisa:mir-moar-constants, r=nikomatsakisbors-0/+28
Still will not translate references to items like `X` or `Y::V` where ``` struct X; enum Y { V } ``` but I must go work on university things so I’m PRing what I have. r? @nikomatsakis
2015-12-16Auto merge of #30300 - sanxiyn:syntax-ext, r=nikomatsakisbors-5/+7
This reduces iteration time (`make rustc-stage1`) for moved syntax extensions from 11 minutes to 3 minutes on my machine. Because of the signature change, this is a [breaking-change] for people directly calling `expand_crate`. I think it is rare: from GitHub search, only case I found is [glassful](https://github.com/kmcallister/glassful).
2015-12-15Implement references to functions and constantsSimonas Kazlauskas-0/+28
2015-12-15Fix custom deriving testsSeo Sanghyeon-5/+7
2015-12-12Address the review commentsVadim Petrochenkov-0/+9
2015-12-12Implement `#[deprecated]` attribute (RFC 1270)Vadim Petrochenkov-0/+87
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-8/+6
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-03Use the extern item-path for documentation linksmitaa-0/+11
The local item-path includes the local crates path to the extern crate declaration which breaks cross-crate rustdoc links if the extern crate is not linked into the crate root or renamed via `extern foo as bar`.
2015-11-26move librustc/plugin to librustc_pluginAriel Ben-Yehuda-18/+36
this is a [breaking-change] to all plugin authors - sorry
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-8/+0
2015-11-23Auto merge of #29952 - petrochenkov:depr, r=brsonbors-28/+28
Part of https://github.com/rust-lang/rust/issues/29935 The deprecation lint is still called "deprecated", so people can continue using `#[allow(deprecated)]` and similar things.
2015-11-20Remove slice pattern from compiler plugin exampleFlorian Hahn-2/+9
closes #29930
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-28/+28
2015-11-19Show constness for functions of reexported docsmitaa-0/+20
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+16
2015-11-15Auto merge of #29788 - mitaa:module_name, r=arielb1bors-0/+23
f357d55 caused a regression by retrieving item names from metadata, while previously using the last element of its absolute path (which in the case of a root module is the prefixed crate name since the stored path in metadata is empty) fixes #28927
2015-11-13Move the panicking parse functions out of the parserKyle Mayes-1/+1
Since these functions are only used by the AST quoting syntax extensions, they should be there instead of in the parser.
2015-11-13Store a valid name for the root module in metadatamitaa-0/+23
2015-11-06Auto merge of #29582 - oli-obk:token_tree, r=sfacklerbors-3/+3
2015-11-06remove `Tt` prefix from TokenType variantsOliver Schneider-3/+3
[breaking change]
2015-11-05rustc_privacy: Do not export items needed solely for the reachability analysisVadim Petrochenkov-1/+21
Process them in middle::reachable instead Add tests for reachability of trait methods written in UFCS form
2015-11-03Auto merge of #29285 - eefriedman:libsyntax-panic, r=nrcbors-1/+1
A set of commits which pushes some panics out of core parser methods, and into users of those parser methods.
2015-10-28Make quote plugin use parsing functions which explicitly panic.Eli Friedman-1/+1
Rename parse_* to parse_*_panic, and add parse_attribute_panic.
2015-10-28Fix for middle::reachable + better comments and testsVadim Petrochenkov-0/+29
In `middle::reachable` mark default impl of a trait method as reachable if this trait method is used from inlinable code
2015-10-21don't revisit modules while finding traits in suggestAriel Ben-Yehuda-0/+15
Fixes #29181
2015-10-13Refactor attr::StabilityVadim Petrochenkov-25/+25
Stricter checking + enforcement of invariants at compile time
2015-10-03Change tests per RFC 246 (const vs static)Seo Sanghyeon-5/+1
2015-09-26Auto merge of #28646 - vadimcn:imps, r=alexcrichtonbors-0/+15
As discussed in the referenced issues, this PR makes rustc emit `__imp_<symbol>` stubs for all public static data to ensure smooth linking in on `-windows-msvc` targets. Resolves #26591, cc #27438
2015-09-26Auto merge of #28642 - petrochenkov:name3, r=nrcbors-2/+2
This PR removes random remaining `Ident`s outside of libsyntax and performs general cleanup In particular, interfaces of `Name` and `Ident` are tidied up, `Name`s and `Ident`s being small `Copy` aggregates are always passed to functions by value, and `Ident`s are never used as keys in maps, because `Ident` comparisons are tricky. Although this PR closes https://github.com/rust-lang/rust/issues/6993 there's still work related to it: - `Name` can be made `NonZero` to compress numerous `Option<Name>`s and `Option<Ident>`s but it requires const unsafe functions. - Implementation of `PartialEq` on `Ident` should be eliminated and replaced with explicit hygienic, non-hygienic or member-wise comparisons. - Finally, large parts of AST can potentially be converted to `Name`s in the same way as HIR to clearly separate identifiers used in hygienic and non-hygienic contexts. r? @nrc
2015-09-25Converted test to rpass.Vadim Chugunov-0/+15
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-2/+2
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24Remove the deprecated box(PLACE) syntax.Eduard Burtescu-1/+1
2015-09-22Use Names in HIR ItemsVadim Petrochenkov-1/+1
2015-09-19Feature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`Andrew Paseltiner-0/+1
Closes #28091.
2015-09-18Overloaded augmented assignmentsJorge Aparicio-0/+22
2015-09-17Change to a multi-trait approachNick Cameron-9/+16
[breaking-change] for lint authors You must now implement LateLintPass or EarlyLintPass as well as LintPass and use either register_late_lint_pass or register_early_lint_pass, rather than register_lint_pass.
2015-09-17Changes to testsNick Cameron-6/+6
2015-09-16Use ast attributes every where (remove HIR attributes).Nick Cameron-1/+3
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-14Auto merge of #28392 - arielb1:sort-bounds-list, r=eddybbors-0/+20
The sort key is a (DefId, Name), which is *not* stable between runs, so we must re-sort when loading. Fixes #24063 Fixes #25467 Fixes #27222 Fixes #28377 r? @eddyb
2015-09-13sort the existential bounds list in tydecodeAriel Ben-Yehuda-0/+20
The sort key is a (DefId, Name), which is *not* stable between runs, so we must re-sort when loading. Fixes #24063 Fixes #25467 Fixes #27222 Fixes #28377
2015-09-09Add testManish Goregaokar-0/+38
2015-09-03Move lints to HIRManish Goregaokar-10/+9