about summary refs log tree commit diff
path: root/src/test/run-pass/writealias.rs
AgeCommit message (Collapse)AuthorLines
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-19/+0
2019-07-27tests: Add missing run-pass annotationsVadim Petrochenkov-0/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-21Allow various lints as part of ui-ifying `src/test/run-pass` suite.Felix S. Klock II-0/+1
2015-04-08Remove pretty-expanded from failing testsAlex Crichton-1/+0
This commit removes pretty-expanded from all tests that wind up calling panic! one way or another now that its internals are unstable.
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-1/+1
Now that support has been removed, all lingering use cases are renamed.
2015-03-23rustdoc: Replace no-pretty-expanded with pretty-expandedBrian Anderson-0/+2
Now that features must be declared expanded source often does not compile. This adds 'pretty-expanded' to a bunch of test cases that still work.
2014-12-29std: Return Result from RWLock/Mutex methodsAlex Crichton-8/+6
All of the current std::sync primitives have poisoning enable which means that when a task fails inside of a write-access lock then all future attempts to acquire the lock will fail. This strategy ensures that stale data whose invariants are possibly not upheld are never viewed by other tasks to help propagate unexpected panics (bugs in a program) among tasks. Currently there is no way to test whether a mutex or rwlock is poisoned. One method would be to duplicate all the methods with a sister foo_catch function, for example. This pattern is, however, against our [error guidelines][errors]. As a result, this commit exposes the fact that a task has failed internally through the return value of a `Result`. [errors]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md#do-not-provide-both-result-and-fail-variants All methods now return a `LockResult<T>` or a `TryLockResult<T>` which communicates whether the lock was poisoned or not. In a `LockResult`, both the `Ok` and `Err` variants contains the `MutexGuard<T>` that is being returned in order to allow access to the data if poisoning is not desired. This also means that the lock is *always* held upon returning from `.lock()`. A new type, `PoisonError`, was added with one method `into_guard` which can consume the assertion that a lock is poisoned to gain access to the underlying data. This is a breaking change because the signatures of these methods have changed, often incompatible ways. One major difference is that the `wait` methods on a condition variable now consume the guard and return it in as a `LockResult` to indicate whether the lock was poisoned while waiting. Most code can be updated by calling `.unwrap()` on the return value of `.lock()`. [breaking-change]
2014-12-18Revise std::thread API to join by defaultAaron Turon-2/+2
This commit is part of a series that introduces a `std::thread` API to replace `std::task`. In the new API, `spawn` returns a `JoinGuard`, which by default will join the spawned thread when dropped. It can also be used to join explicitly at any time, returning the thread's result. Alternatively, the spawned thread can be explicitly detached (so no join takes place). As part of this change, Rust processes now terminate when the main thread exits, even if other detached threads are still running, moving Rust closer to standard threading models. This new behavior may break code that was relying on the previously implicit join-all. In addition to the above, the new thread API also offers some built-in support for building blocking abstractions in user space; see the module doc for details. Closes #18000 [breaking-change]
2014-12-18libs: merge librustrt into libstdAaron Turon-2/+2
This commit merges the `rustrt` crate into `std`, undoing part of the facade. This merger continues the paring down of the runtime system. Code relying on the public API of `rustrt` will break; some of this API is now available through `std::rt`, but is likely to change and/or be removed very soon. [breaking-change]
2014-11-20Make most of std::rt privateAaron Turon-1/+2
Previously, the entire runtime API surface was publicly exposed, but that is neither necessary nor desirable. This commit hides most of the module, using librustrt directly as needed. The arrangement will need to be revisited when rustrt is pulled into std. [breaking-change]
2014-10-29Rename fail! to panic!Steve Klabnik-1/+1
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-08-16librustc: Forbid external crates, imports, and/or items from beingPatrick Walton-3/+1
declared with the same name in the same scope. This breaks several common patterns. First are unused imports: use foo::bar; use baz::bar; Change this code to the following: use baz::bar; Second, this patch breaks globs that import names that are shadowed by subsequent imports. For example: use foo::*; // including `bar` use baz::bar; Change this code to remove the glob: use foo::{boo, quux}; use baz::bar; Or qualify all uses of `bar`: use foo::{boo, quux}; use baz; ... baz::bar ... Finally, this patch breaks code that, at top level, explicitly imports `std` and doesn't disable the prelude. extern crate std; Because the prelude imports `std` implicitly, there is no need to explicitly import it; just remove such directives. The old behavior can be opted into via the `import_shadowing` feature gate. Use of this feature gate is discouraged. This implements RFC #116. Closes #16464. [breaking-change]
2014-06-06test: Fix fallout of previous changesAlex Crichton-4/+4
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-1/+1
compile-fail tests, run-fail tests, and run-pass tests.
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-1/+1
Who doesn't like a massive renaming?
2013-09-30rpass: Remove usage of fmt!Alex Crichton-1/+1
2013-07-27Change concurrency primitives to standard naming conventionsSteven Stewart-Gallus-1/+1
To be more specific: `UPPERCASETYPE` was changed to `UppercaseType` `type_new` was changed to `Type::new` `type_function(value)` was changed to `value.method()`
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-5/+10
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-1/+1
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-1/+1
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-1/+1
2013-02-22test: De-mut the test suite. rs=demutingPatrick Walton-2/+2
2013-02-01check-fast fallout from removing export, r=burningtreeGraydon Hoare-1/+1
2013-01-26testsuite: Eliminate uses of structural records from most run-pass testsTim Chevalier-3/+3
Except the pipes tests (that needs a snapshot)
2012-12-10Reliciense makefiles and testsuite. Yup.Graydon Hoare-0/+10
2012-10-05Remove by-mutable-ref mode from the compilerTim Chevalier-2/+2
and test cases. Closes #3513
2012-03-26Bulk-edit mutable -> mut.Graydon Hoare-2/+2
2012-03-22make --enforce-mut-vars always on, add mut annotations to remaining filesNiko Matsakis-1/+1
2011-09-12Pretty-print for new arg-mode syntaxMarijn Haverbeke-1/+1
2011-08-20ReformatBrian Anderson-1/+1
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-07-27Reformat for new syntaxMarijn Haverbeke-3/+3
2011-06-15Reformat source tree (minus a couple tests that are still grumpy).Graydon Hoare-8/+8
2011-05-02Un-revert "Use different syntax for checks that matter to typestate", fixing ↵Patrick Walton-1/+1
the problem. This reverts commit d08b443fffb1181d8d45ae5d061412f202dd4118.
2011-05-02Revert "Use different syntax for checks that matter to typestate"Graydon Hoare-1/+1
This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
2011-05-02Use different syntax for checks that matter to typestateTim Chevalier-1/+1
This giant commit changes the syntax of Rust to use "assert" for "check" expressions that didn't mean anything to the typestate system, and continue using "check" for checks that are used as part of typestate checking. Most of the changes are just replacing "check" with "assert" in test cases and rustc.
2011-04-19Remove effect system from src.Graydon Hoare-2/+2
2010-11-02Split out stratum-checking pass, implement more-strict (overly aggressive) ↵Graydon Hoare-2/+2
impure-effect checking.
2010-07-15Make mutability no longer a type constructorPatrick Walton-1/+1
2010-06-30rewrite 'mutable &' as '& mutable', corresponding to grammar shift.Graydon Hoare-1/+1
2010-06-23Populate tree.Graydon Hoare-0/+13