vector-reference-to-unsafe-pointer-to-element cast if the type to be
casted to is not fully specified.
This is a conservative change to fix the user-visible symptoms of the
issue. A more flexible treatment would delay cast checks to after
function typechecking.
This can break code that did:
let x: *u8 = &([0, 0]) as *_;
Change this code to:
let x: *u8 = &([0, 0]) as *u8;
Closes#14893.
[breaking-change]
r? @alexcrichton
vector-reference-to-unsafe-pointer-to-element cast if the type to be
casted to is not fully specified.
This is a conservative change to fix the user-visible symptoms of the
issue. A more flexible treatment would delay cast checks to after
function typechecking.
This can break code that did:
let x: *u8 = &([0, 0]) as *_;
Change this code to:
let x: *u8 = &([0, 0]) as *u8;
Closes#14893.
[breaking-change]
Yes, it is important to be careful, but repeated emphasis about it is probably
not helpful — it starts to sound like you came for a tutorial but found a
finger-wagging lecture.
Even after I removed a few of these comments, there are still several left in
the text. That's probably fine! A couple of mentions of how this is dangerous
and you ought to be careful may be a good reminder to the reader.
After making the edits, I reflowed the paragraphs that I had touched, using
emacs's "M-x fill-paragraph", with fill-column equal to 70.
This will break code like:
fn f(x: &mut int) {}
let mut a = box 1i;
f(a);
Change it to:
fn f(x: &mut int) {}
let mut a = box 1i;
f(&mut *a);
RFC 33; issue #10504.
[breaking-change]
The f128 type has very little support in the compiler and the feature is
basically unusable today. Supporting half-baked features in the compiler can be
detrimental to the long-term development of the compiler, and hence this feature
is being removed.
Closes#14482 (std: Bring back half of Add on String)
Closes#15026 (librustc: Remove the fallback to `int` from typechecking.)
Closes#15119 (Add more description to c_str::unwrap().)
Closes#15120 (Add tests for #12470 and #14285)
Closes#15122 (Remove the cheat sheet.)
Closes#15126 (rustc: Always include the morestack library)
Closes#15127 (Improve ambiguous pronoun.)
Closes#15130 (Fix#15129)
Closes#15131 (Add the Guide, add warning to tutorial.)
Closes#15134 (Xfailed tests for hygiene, etc.)
Closes#15135 (core: Add stability attributes to Clone)
Closes#15136 (Some minor improvements to core::bool)
Closes#15137 (std: Add stability attributes to primitive numeric modules)
Closes#15141 (Fix grammar in tutorial)
Closes#15143 (Remove few FIXMEs)
Closes#15145 (Avoid unnecessary temporary on assignments)
Closes#15147 (Small improvements for metaprogramming)
Closes#15153 (librustc: Check function argument patterns for legality of by-move)
Closes#15154 (test: Add a test for regions, traits, and variance.)
Closes#15159 (rustc: Don't register syntax crates twice)
Closes#13816 (Stabilize version output for rustc and rustdoc)
This is because I observed someone reading the tutorial who thought they'd
missed something when they got to the mention of variable bindings.
This patch doesn't reflow the paragraphs so that you can see the semantic
change that I made, and a subsequent patch will reflow this paragraph.
Fixes https://github.com/rust-lang/rust/issues/13570.
Yes, it is important to be careful, but repeated emphasis about it is probably
not helpful — it starts to sound like you came for a tutorial but found a
finger-wagging lecture.
Even after I removed a few of these comments, there are still several left in
the text. That's probably fine! A couple of mentions of how this is dangerous
and you ought to be careful may be a good reminder to the reader.
After making the edits, I reflowed the paragraphs that I had touched, using
emacs's "M-x fill-paragraph", with fill-column equal to 70.
bindings.
This will break code that incorrectly did things like:
fn f(a @ box b: Box<String>) {}
Fix such code to not rely on undefined behavior.
Closes#12534.
[breaking-change]
The following are unstable:
- core::int, i8, i16, i32, i64
- core::uint, u8, u16, u32, u64
- core::int::{BITS, BYTES, MIN, MAX}, etc.
- std::int, i8, i16, i32, i64
- std::uint, u8, u16, u32, u64
The following are experimental:
- std::from_str::FromStr and impls - may need to return Result instead of Option
- std::int::parse_bytes, etc. - ditto
- std::num::FromStrRadix and impls - ditto
- std::num::from_str_radix - ditto
The following are deprecated:
- std::num::ToStrRadix and imples - Wrapper around fmt::radix. Wrong name (Str vs String)
See https://github.com/rust-lang/rust/wiki/Meeting-API-review-2014-06-23#uint
The following are tagged 'unstable'
- core::clone
- Clone
- Clone::clone
- impl Clone for Arc
- impl Clone for arc::Weak
- impl Clone for Rc
- impl Clone for rc::Weak
- impl Clone for Vec
- impl Clone for Cell
- impl Clone for RefCell
- impl Clone for small tuples
The following are tagged 'experimental'
- Clone::clone_from - may not provide enough utility
- impls for various extern "Rust" fns - may not handle lifetimes correctly
See https://github.com/rust-lang/rust/wiki/Meeting-API-review-2014-06-23#clone
In line with what @brson, @cmr, @nikomatsakis and I discussed this morning, my
redux of the tutorial will be implemented as the Guide. This way, I can work in
small iterations, rather than dropping a huge PR, which is hard to review. In
addition, the community can observe my work as I'm doing it.
This adds a note in line with [this comment][reddit] that clarifies the state
of the tutorial, and the community's involvement with it.
[reddit]: http://www.reddit.com/r/rust/comments/28bew8/rusts_documentation_is_about_to_drastically/ci9c98k
It was previously assumed that the object file generated by LLVM would always
require the __morestack function, but that assumption appears to be incorrect,
as outlined in #15108. This commit forcibly tells the linker to include the
entire archive, regardless of whether it's currently necessary or not.
Closes#15108
The #14869 removed `TraitStore` from `ty_trait` and represented trait
reference as regular `ty_rptr`. An old bug of the missing constraint
upon lifetime parameter of trait reference then is fixed as a side
effect. Adds tests for affected bugs and closes them.
Closes#12470.
Closes#14285.
This breaks a fair amount of code. The typical patterns are:
* `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`;
* `println!("{}", 3)`: change to `println!("{}", 3i)`;
* `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`.
RFC #30. Closes#6023.
[breaking-change]
This adds an implementation of Add for String where the rhs is <S: Str>. The
other half of adding strings is where the lhs is <S: Str>, but coherence and
the libcore separation currently prevent that.
The f128 type has very little support in the compiler and the feature is
basically unusable today. Supporting half-baked features in the compiler can be
detrimental to the long-term development of the compiler, and hence this feature
is being removed.
This is a rebase of #14804 with two new commits on top to implement and test lint plugins.
r? @alexcrichton @huonw: Can you take a look at the new commits, and also weigh in about any issues from the old PR that you feel are still unresolved? I'm leaving the old branch alone to preserve discussion history.