summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2015-04-23test: Fix fallout in testsAlex Crichton-3/+0
2015-04-16Auto merge of #24448 - alexcrichton:issue-24445, r=huonwbors-0/+53
One of the parameters to the magical "register a thread-local destructor" function is called `__dso_handle` and largely just passed along (this seems to be what other implementations do). Currently we pass the *value* of this symbol, but apparently the correct piece of information to pass is the *address* of the symbol. In a PIE binary the symbol actually contains an address to itself which is why we've gotten away with what we're doing as long as we have. In a non-PIE binary the symbol contains the address `NULL`, causing a segfault in the runtime library if it keeps going. Closes #24445
2015-04-16Auto merge of #24423 - tbelaire:include_bytes, r=alexcrichtonbors-0/+40
This is a little bit tricky, since with include_str!, we know that we are including utf-8 content, so it's safe to store the source as a String in a FileMap. We don't know that for include_bytes!, but I don't think we actually need to track the contents anyways, so I'm passing "". new_filemap does check for the zero length content, and it should be reasonable, howeven I'm not sure if it would be better to pass None instead of Some(Rc::new("")) as the src component of a FileMap. Fixes bug #24348
2015-04-16Auto merge of #24485 - brson:is, r=alexcrichtonbors-1/+1
It was an oversight that this was not done in the great int upheaval. [breaking-change]
2015-04-15Forbid is/us suffixes. Fixes #22496Brian Anderson-1/+1
It was an oversight that this was not done in the great int upheaval. [breaking-change]
2015-04-15std: Fix thread_local! in non-PIE binariesAlex Crichton-0/+53
One of the parameters to the magical "register a thread-local destructor" function is called `__dso_handle` and largely just passed along (this seems to be what other implementations do). Currently we pass the *value* of this symbol, but apparently the correct piece of information to pass is the *address* of the symbol. In a PIE binary the symbol actually contains an address to itself which is why we've gotten away with what we're doing as long as we have. In a non-PIE binary the symbol contains the address `NULL`, causing a segfault in the runtime library if it keeps going. Closes #24445
2015-04-15Added a test for include_bytes! dep infoTheo Belaire-0/+40
This tests that both include_str! and include_bytes! mark their input file as a dependancy, and it's correctly outputted when you run `rustc --emit dep-info`.
2015-04-14test: Fixup many library unit testsAlex Crichton-34/+28
2015-04-14RebasedNick Cameron-3/+3
2015-04-10Test fixes and review feedbackAlex Crichton-2/+0
2015-04-07test: Move all run-make rustdoc tests to test/rustdocAlex Crichton-648/+0
2015-04-04fixing some tests and temporarily disabling others to get Bitrig build ↵Dave Huseby-9/+27
working 100%
2015-04-02Fallout in testsNiko Matsakis-12/+4
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]