summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2015-04-01rollup merge of #23860: nikomatsakis/copy-requires-cloneAlex Crichton-3/+3
Conflicts: src/test/compile-fail/coherence-impls-copy.rs
2015-04-01Path rustdoc testNiko Matsakis-0/+3
2015-04-01Fallout in testsNiko Matsakis-3/+3
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-4/+4
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-28Fix some typosVadim Petrochenkov-2/+2
2015-03-28Rollup merge of #23803 - richo:unused-braces, r=ManishearthManish Goregaokar-1/+1
Pretty much what it says on the tin.
2015-03-28cleanup: Remove unused braces in use statementsRicho Healey-1/+1
2015-03-27rollup merge of #23786: alexcrichton/less-quotesAlex Crichton-2/+22
Conflicts: src/test/auxiliary/static-function-pointer-aux.rs src/test/auxiliary/trait_default_method_xc_aux.rs src/test/run-pass/issue-4545.rs
2015-03-27Test fixes and rebase conflicts, round 3Alex Crichton-1/+1
2015-03-27rollup merge of #23794: brson/slicegateAlex Crichton-0/+2
Conflicts: src/test/run-pass/issue-13027.rs
2015-03-27Feature gate *all* slice patterns. #23121Brian Anderson-0/+2
Until some backwards-compatibility hazards are fixed in #23121, these need to be unstable. [breaking-change]
2015-03-27Fix fallout of removing quotes in crate namesAlex Crichton-1/+1
2015-03-27Merge 'richo/unquote-crates' into less-quotesAlex Crichton-1/+1
Conflicts: src/libsyntax/parse/parser.rs
2015-03-27Unquote all crate names without underscoresRicho Healey-1/+1
2015-03-27rustc: Remove support for hyphens in crate namesAlex Crichton-0/+20
This commit removes parser support for `extern crate "foo" as bar` as the renamed crate is now required to be an identifier. Additionally this commit enables hard errors on crate names that contain hyphens in them, they must now solely contain alphanumeric characters or underscores. If the crate name is inferred from the file name, however, the file name `foo-bar.rs` will have the crate name inferred as `foo_bar`. If a binary is being emitted it will have the name `foo-bar` and a library will have the name `libfoo_bar.rlib`. This commit is a breaking change for a number of reasons: * Old syntax is being removed. This was previously only issuing warnings. * The output for the compiler when input is received on stdin is now `rust_out` instead of `rust-out`. * The crate name for a crate in the file `foo-bar.rs` is now `foo_bar` which can affect infrastructure such as logging. [breaking-change]
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-34/+34
Now that support has been removed, all lingering use cases are renamed.
2015-03-24rollup merge of #23546: alexcrichton/hyphensAlex Crichton-1/+1
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc #23533
2015-03-24rustc: Add support for `extern crate foo as bar`Alex Crichton-1/+1
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc #23533
2015-03-25Add trivial cast lints.Nick Cameron-1/+1
This permits all coercions to be performed in casts, but adds lints to warn in those cases. Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference. [breaking change] * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed. * The unused casts lint has gone. * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are: - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_` - Casts do not influence inference of integer types. E.g., the following used to type check: ``` let x = 42; let y = &x as *const u32; ``` Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information: ``` let x: u32 = 42; let y = &x as *const u32; ```
2015-03-23Test fixes and rebase conflicts, round 2Alex Crichton-3/+3
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-4/+23
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23rollup merge of #23211: FlaPer87/oibit-send-and-friendsAlex Crichton-0/+2
Fixes #23225 r? @nikomatsakis
2015-03-23Require feature attributes, and add them where necessaryBrian Anderson-4/+24
2015-03-20std: Remove old_io/old_path from the preludeAlex Crichton-22/+27
This commit removes the reexports of `old_io` traits as well as `old_path` types and traits from the prelude. This functionality is now all deprecated and needs to be removed to make way for other functionality like `Seek` in the `std::io` module (currently reexported as `NewSeek` in the io prelude). Closes #23377 Closes #23378
2015-03-20fix falloutFlavio Percoco-0/+2
2015-03-18[rustdoc] Fix source hyperlinks in docsIvan Petkov-0/+87
* rustdoc was doubly appending the file name to the path of where to generate the source files, meanwhile, the [src] hyperlinks were not * Added a flag to rustdoc::html::render::clean_srcpath to ignore the last path component, i.e. the file name itself to prevent the issue * This also avoids creating directories with the same name as source files, and it makes sure the link to `main.css` is correct as well. * Added regression tests to ensure the rustdoc heirarchy of rendered source files remains consistent Fixes #23192
2015-03-15Strip trailing whitespaceTamir Duberstein-2/+2
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-27/+0
2015-03-12rustdoc: Fix ICE with cross-crate default implsAlex Crichton-0/+55
This adds a special code path for impls which are listed as default impls to ensure that they're loaded correctly.
2015-03-12Rollup merge of #23238 - mahkoh:nativecpu, r=dotdashManish Goregaokar-0/+17
2015-03-10Add support for target-cpu=nativeJulian Orth-0/+17
2015-03-09Auto merge of #22561 - richo:as_slice-as_str, r=Manishearthbors-1/+1
This may not be quite ready to go out, I fixed some docs but suspect I missed a bunch. I also wound up fixing a bunch of redundant `[]` suffixes, but on closer inspection I don't believe that can land until after a snapshot.
2015-03-09fix rmakeManish Goregaokar-1/+1
2015-03-09remove uses of as_slice where deref coercions can be usedRicho Healey-1/+1
2015-03-08Add a test for a bare outfile param to rustcRicho Healey-0/+16
2015-03-06Rollup merge of #23101 - laijs:fix-file-perm, r=alexcrichtonManish Goregaokar-0/+0
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-03-06Rollup merge of #22980 - alexcrichton:debug-assertions, r=pnkfelixManish Goregaokar-0/+63
This commit is an implementation of [RFC 563][rfc] which adds a new `cfg(debug_assertions)` directive which is specially recognized and calculated by the compiler. The flag is turned off at any optimization level greater than 1 and may also be explicitly controlled through the `-C debug-assertions` flag. [rfc]: https://github.com/rust-lang/rfcs/pull/563 The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of the `ndebug` variable and `ndebug` no longer holds any meaning to the standard library. Code which was previously relying on `not(ndebug)` to gate expensive code should be updated to rely on `debug_assertions` instead. Closes #22492 [breaking-change]
2015-03-06file permission: remove executable bit from *.rsLai Jiangshan-0/+0
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-03-05rustc: Add a debug_assertions #[cfg] directiveAlex Crichton-0/+63
This commit is an implementation of [RFC 563][rfc] which adds a new `cfg(debug_assertions)` directive which is specially recognized and calculated by the compiler. The flag is turned off at any optimization level greater than 1 and may also be explicitly controlled through the `-C debug-assertions` flag. [rfc]: https://github.com/rust-lang/rfcs/pull/563 The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of the `ndebug` variable and `ndebug` no longer holds any meaning to the standard library. Code which was previously relying on `not(ndebug)` to gate expensive code should be updated to rely on `debug_assertions` instead. Closes #22492 [breaking-change]
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-15/+15
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-4/+6
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-03-03Switched to Box::new in many places.Felix S. Klock II-3/+4
Many of the modifications putting in `Box::new` calls also include a pointer to Issue 22405, which tracks going back to `box <expr>` if possible in the future. (Still tried to use `Box<_>` where it sufficed; thus some tests still have `box_syntax` enabled, as they use a mix of `box` and `Box::new`.) Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-02-28Separate most of rustc::lint::builtin into a separate crate.Huon Wilson-0/+2
This pulls out the implementations of most built-in lints into a separate crate, to reduce edit-compile-test iteration times with librustc_lint and increase parallelism. This should enable lints to be refactored, added and deleted much more easily as it slashes the edit-compile cycle to get a minimal working compiler to test with (`make rustc-stage1`) from librustc -> librustc_typeck -> ... -> librustc_driver -> libcore -> ... -> libstd to librustc_lint -> librustc_driver -> libcore -> ... libstd which is significantly faster, mainly due to avoiding the librustc build itself. The intention would be to move as much as possible of the infrastructure into the crate too, but the plumbing is deeply intertwined with librustc itself at the moment. Also, there are lints for which diagnostics are registered directly in the compiler code, not in their own crate traversal, and their definitions have to remain in librustc. This is a [breaking-change] for direct users of the compiler APIs: callers of `rustc::session::build_session` or `rustc::session::build_session_` need to manually call `rustc_lint::register_builtins` on their return value. This should make #22206 easier.
2015-02-27Auto merge of #22765 - sanxiyn:dedup-rustdoc, r=alexcrichtonbors-0/+41
rustdoc impl item did not include default methods for local crates, but did include them for external crates. This resulted in duplicate methods. Fix so that impl item does not include default methods for external crates. Fix #22595.
2015-02-27Add a rustdoc test for default methods in external cratesSeo Sanghyeon-0/+41
2015-02-24Rollup merge of #22580 - pnkfelix:guard-pat-cfg2, r=pnkfelixManish Goregaokar-9/+9
aatch's cfg revisions, namely to match expressions Revise handling of match expressions so that arms branch to next arm. Update the graphviz tests accordingly. Fixes #22073. (Includes regression test for the issue.)
2015-02-22revise handling of match expressions so that arms branch to next arm.James Miller-9/+9
Update the graphviz tests accordingly. Fixes #22073. (Includes regression test for the issue.) (Factoring of aatch CFG code, Part 4.)
2015-02-22Disallow crate names with leading hyphensChris Wong-0/+3
Leading hyphens already don't work (#22661), so no code should break from this change. Closes #22661.
2015-02-19Round 5 test fixes and rebase conflictsAlex Crichton-1/+1
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-16/+28
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs