about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2015-01-22Auto merge of #21187 - oli-obk:feature/hint_struct_field_access, r=alexcrichtonbors-0/+71
rebase and fix of #19267
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-12/+52
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21rollup merge of #21252: nikomatsakis/assoc-type-ice-hunt-take-2Alex Crichton-0/+57
Project region bounds out of the trait when deciding whether a projection type outlives a given regions. Fixes #20890. Fixes #21150.
2015-01-21Deny imports after non-item statements.Eduard Burtescu-0/+21
2015-01-21Added some tests for arbitrary ordered view itemsMarvin Löbel-0/+52
2015-01-21tests: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-35/+2
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-11/+11
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21441: alexcrichton/rustc-optsAlex Crichton-18/+2
This is a bit of cleanup work to clean out some old deprecated flags and deprecated lint names from the compiler (they've been deprecated for quite awhile now). This also notably puts `--pretty` behind the `-Z unstable-options` flag (where it was supposed to be previously).
2015-01-21rollup merge of #21429: GuillaumeGomez/macro-fixAlex Crichton-0/+14
This is little clean code of this PR: #21366. I patched the same thing as aochagavia but too slowly obviously. This is a merge of our two codes, more "rust-like".
2015-01-21rollup merge of #21421: huonw/one-suggestion-per-traitAlex Crichton-0/+22
This is clearly useless, the user doesn't need to know that they could implement/import `foo::bar::Baz` 4 times. Fixes #21405.
2015-01-21rollup merge of #21411: P1start/help-tweaksAlex Crichton-9/+9
Conflicts: src/librustc_typeck/check/closure.rs
2015-01-21rollup merge of #21396: japaric/no-parens-in-rangeAlex Crichton-2/+2
Conflicts: src/libsyntax/parse/lexer/comments.rs
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-11/+11
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-20rustc: Remove deprecated lint namesAlex Crichton-18/+2
These were all renamed quite some time ago, so remove their old names from the compiler.
2015-01-20Forbid coercing &T to &mut TSeo Sanghyeon-4/+29
2015-01-20Avoid suggesting traits multiple times.Huon Wilson-0/+22
This is clearly useless, the user doesn't need to know that they could implement/import `foo::bar::Baz` 4 times. Fixes #21405.
2015-01-20librustc: hint close matches on accessing nonexisting fieldsOliver Schneider-0/+71
2015-01-20Fix up some ‘help’ messagesP1start-9/+9
2015-01-20Auto merge of #21257 - alexcrichton:issue-20064, r=pnkfelixbors-2/+37
These two attributes are used to change the entry point into a Rust program, but for now they're being put behind feature gates until we have a chance to think about them a little more. The #[start] attribute specifically may have its signature changed. This is a breaking change to due the usage of these attributes generating errors by default now. If your crate is using these attributes, add this to your crate root: #![feature(start)] // if you're using the #[start] attribute #![feature(main)] // if you're using the #[main] attribute cc #20064
2015-01-19Auto merge of #21165 - alexcrichton:second-pass-type-id, r=aturonbors-4/+2
This commit aims to stabilize the `TypeId` abstraction by moving it out of the `intrinsics` module into the `any` module of the standard library. Specifically, * `TypeId` is now defined at `std::any::TypeId` * `TypeId::hash` has been removed in favor of an implementation of `Hash`. This commit also performs a final pass over the `any` module, confirming the following: * `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely never require this, and the `Any` trait does not need to be implemented for any other types. As a result, this implementation detail can remain unstable until associated statics are implemented. * `Any::downcast_ref` is now stable * `Any::downcast_mut` is now stable * `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today it does not allow downcasting of trait objects like `Box<Any + Send>` (those returned from `Thread::join`). This is covered by #18737. * `BoxAny::downcast` is now stable.
2015-01-19Auto merge of #21278 - thchittenden:issue-21033-struct-var-pattern-fix, ↵bors-1/+1
r=alexcrichton Closes #21033. The new strategy for parsing a field pattern is to look 1 token ahead and if it's a colon, parse as "fieldname: pat", otherwise parse the shorthand form "(box) (ref) (mut) fieldname)". The previous strategy was to parse "(ref) (mut) fieldname" then if we encounter a colon, throw an error if either "ref" or "mut" were encountered.
2015-01-19remove unnecessary parentheses from range notationJorge Aparicio-2/+2
2015-01-19Fixes #21033 with accompanying test.Tom Chittenden-1/+1
2015-01-18std: Stabilize TypeId and tweak BoxAnyAlex Crichton-4/+2
This commit aims to stabilize the `TypeId` abstraction by moving it out of the `intrinsics` module into the `any` module of the standard library. Specifically, * `TypeId` is now defined at `std::any::TypeId` * `TypeId::hash` has been removed in favor of an implementation of `Hash`. This commit also performs a final pass over the `any` module, confirming the following: * `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely never require this, and the `Any` trait does not need to be implemented for any other types. As a result, this implementation detail can remain unstable until associated statics are implemented. * `Any::downcast_ref` is now stable * `Any::downcast_mut` is now stable * `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today it does not allow downcasting of trait objects like `Box<Any + Send>` (those returned from `Thread::join`). This is covered by #18737. * `BoxAny::downcast` is now stable.
2015-01-18rustc_resolve: Do not allow mods to shadow typesAlex Crichton-0/+44
This commit modifies resolve to prevent conflicts with typedef names in the same method that conflits are prevented with enum names. This is a breaking change due to the differing semantics in resolve, and any errors generated on behalf of this change require that a conflicting typedef, module, or structure to be renamed so they do not conflict. [breaking-change] Closes #6936
2015-01-18Add test for issue #21356Adolfo Ochagavía-0/+14
2015-01-18auto merge of #21276 : huonw/rust/trait-suggestion-nits, r=nikomatsakisbors-7/+7
Follow up to #21008. r? @nikomatsakis
2015-01-17Add allow(unstable) to tests that need itBrian Anderson-0/+11
2015-01-17Register new snapshots.Eduard Burtescu-4/+4
2015-01-17Update syntax of ignored test.Steve Klabnik-1/+1
2015-01-17auto merge of #21233 : huonw/rust/simd-size, r=Aatchbors-0/+26
This stops the compiler ICEing on the use of SIMD types in FFI signatures. It emits correct code for LLVM intrinsics, but I am quite unsure about the ABI handling in general so I've added a new feature gate `simd_ffi` to try to ensure people don't use it without realising there's a non-trivial risk of codegen brokenness. Closes #20043.
2015-01-17auto merge of #21205 : alexcrichton/rust/issue-21202, r=nikomatsakisbors-0/+25
Loading methods from external crates was erroneously using the type's privacy for each method instead of each method's privacy. This commit fixes that. Closes #21202 This commit also moves privacy to its own crate because I thought that was where the bug was. Turns out it wasn't, but it helped me iterate at least!
2015-01-17Address nits in trait suggestions.Huon Wilson-7/+7
2015-01-17Feature gate SIMD in FFI, due to unknown ABIs.Huon Wilson-0/+26
I don't know if this handling of SIMD types is correct for the C ABI on all platforms, so lets add an even finer feature gate than just the `simd` one. The `simd` one can be used with (relatively) little risk of complete nonsense, the reason for it is that it is likely that things will change. Using the types in FFI with an incorrect ABI will at best give absolute nonsense results, but possibly cause serious breakage too, so this is a step up in badness, hence a new feature gate.
2015-01-16syntax: Feature gate #[start] and #[main]Alex Crichton-2/+37
These two attributes are used to change the entry point into a Rust program, but for now they're being put behind feature gates until we have a chance to think about them a little more. The #[start] attribute specifically may have its signature changed. This is a breaking change to due the usage of these attributes generating errors by default now. If your crate is using these attributes, add this to your crate root: #![feature(start)] // if you're using the #[start] attribute #![feature(main)] // if you're using the #[main] attribute cc #20064
2015-01-16auto merge of #21008 : huonw/rust/trait-suggestions, r=nikomatsakisbors-0/+62
For a call like `foo.bar()` where the method `bar` can't be resolved, the compiler will search for traits that have methods with name `bar` to give a more informative error, providing a list of possibilities. Closes #7643.
2015-01-16Project region bounds out of the trait when deciding whether aNiko Matsakis-0/+57
projection type outlives a given region. Fixes #20890.
2015-01-16rustc_resolve: Correctly record privacy of methodsAlex Crichton-0/+25
Loading methods from external crates was erroneously using the type's privacy for each method instead of each method's privacy. This commit fixes that. Closes #21202
2015-01-16Prefer implemented traits in suggestions.Huon Wilson-6/+38
If `a.method();` can't be resolved, we first look for implemented traits globally and suggest those. If there are no such traits found, we only then fall back to suggesting from the unfiltered list of traits.
2015-01-16addressed commentsFlavio Percoco-48/+39
2015-01-16Allow negative impls just for Send and SyncFlavio Percoco-0/+20
2015-01-16Don't use NoSend/NoSync in testsFlavio Percoco-37/+57
2015-01-16Fix coherence for negative implementationsFlavio Percoco-0/+20
2015-01-16Check for negative impls for `Send` and `Sync`Flavio Percoco-20/+38
2015-01-16Negative impls are considered safeFlavio Percoco-0/+20
2015-01-16Add test for missing default implFlavio Percoco-0/+20
2015-01-15rollup merge of #21167: FlaPer87/coherence-implsAlex Crichton-0/+37
Fixes #21080 r? @nikomatsakis [breaking-change]
2015-01-15rollup merge of #21161: japaric/ufcs-hashAlex Crichton-0/+21
expansion now uses `::std::hash::Hash::hash(&*__self_0_0, __arg_0)` instead of `(*__self_0_0).hash(__arg_0)` closes #21160 r? @alexcrichton
2015-01-15rollup merge of #21144: nagisa/asm-str-fixAlex Crichton-0/+16
Fixes #21045
2015-01-15rollup merge of #21107: nikomatsakis/assoc-type-ice-hunt-take-1Alex Crichton-0/+49
Fixes for #20831 and #21010 r? @nick29581