about summary refs log tree commit diff
path: root/src/test/auxiliary
AgeCommit message (Collapse)AuthorLines
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
2015-09-01Remove the Modifier and Decorator kinds of syntax extensions.Nick Cameron-12/+0
This is a [breaking-change] for syntax extension authors. The fix is to use MultiModifier or MultiDecorator, which have the same functionality but are more flexible. Users of syntax extensions are unaffected.
2015-08-29Allow #[derive()] to generate unsafe trait implsMichael Layzell-0/+2
2015-08-15test: Fix tests for requiring issuesAlex Crichton-43/+45
2015-08-14rustc: Allow changing the default allocatorAlex Crichton-0/+149
This commit is an implementation of [RFC 1183][rfc] which allows swapping out the default allocator on nightly Rust. No new stable surface area should be added as a part of this commit. [rfc]: https://github.com/rust-lang/rfcs/pull/1183 Two new attributes have been added to the compiler: * `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to indicate that it requires an allocator crate to be in scope. * `#![allocator]` - this is a indicator that the crate is an allocator which can satisfy the `needs_allocator` attribute above. The ABI of the allocator crate is defined to be a set of symbols that implement the standard Rust allocation/deallocation functions. The symbols are not currently checked for exhaustiveness or typechecked. There are also a number of restrictions on these crates: * An allocator crate cannot transitively depend on a crate that is flagged as needing an allocator (e.g. allocator crates can't depend on liballoc). * There can only be one explicitly linked allocator in a final image. * If no allocator is explicitly requested one will be injected on behalf of the compiler. Binaries and Rust dylibs will use jemalloc by default where available and staticlibs/other dylibs will use the system allocator by default. Two allocators are provided by the distribution by default, `alloc_system` and `alloc_jemalloc` which operate as advertised. Closes #27389
2015-08-14Auto merge of #27641 - nikomatsakis:soundness-rfc-1214, r=nrcbors-1/+0
This PR implements the majority of RFC 1214. In particular, it implements: - the new outlives relation - comprehensive WF checking For the most part, new code receives warnings, not errors, though 3 regressions were found via a crater run. There are some deviations from RFC 1214. Most notably: - we still consider implied bounds from fn ret; this intersects other soundness issues that I intend to address in detail in a follow-up RFC. Fixing this without breaking a lot of code probably requires rewriting compare-method somewhat (which is probably a good thing). - object types do not check trait bounds for fear of encountering `Self`; this was left as an unresolved question in RFC 1214, but ultimately feels inconsistent. Both of those two issues are highlighted in the tracking issue, https://github.com/rust-lang/rust/issues/27579. #27579 also includes a testing matrix with new tests that I wrote -- these probably duplicate some existing tests, I tried to check but wasn't quite sure what to look for. I tried to be thorough in testing the WF relation, at least, but would welcome suggestions for missing tests. r? @nrc (or perhaps someone else?)
2015-08-12Fallout in tests -- we now report an error if you even reference a typeNiko Matsakis-1/+0
`&Foo` where `Foo` is a trait that is not object-safe
2015-08-12stop cross-crate associated types from being importedAriel Ben-Yehuda-0/+6
Fixes #22968 Probably fixes #27602
2015-08-12Auto merge of #27618 - dotdash:drop_fixes, r=luqmanabors-0/+23
2015-08-10trans: Stop informing LLVM about dllexportAlex Crichton-0/+3
Rust's current compilation model makes it impossible on Windows to generate one object file with a complete and final set of dllexport annotations. This is because when an object is generated the compiler doesn't actually know if it will later be included in a dynamic library or not. The compiler works around this today by flagging *everything* as dllexport, but this has the drawback of exposing too much. Thankfully there are alternate methods of specifying the exported surface area of a dll on Windows, one of which is passing a `*.def` file to the linker which lists all public symbols of the dynamic library. This commit removes all locations that add `dllexport` to LLVM variables and instead dynamically generates a `*.def` file which is passed to the linker. This file will include all the public symbols of the current object file as well as all upstream libraries, and the crucial aspect is that it's only used when generating a dynamic library. When generating an executable this file isn't generated, so all the symbols aren't exported from an executable. To ensure that statically included native libraries are reexported correctly, the previously added support for the `#[linked_from]` attribute is used to determine the set of FFI symbols that are exported from a dynamic library, and this is required to get the compiler to link correctly.
2015-08-10Remove morestack supportAlex Crichton-3/+0
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
2015-08-07Fix ICE when trying to drop an unsized type from a different crateBjörn Steinbrink-0/+23
The code to get the LLVM type signature for the drop function doesn't handle unsized types correctly.