Email me

Rust versions / 1.4

Rust release · Oct 29, 2015

Rust 1.4: what's new, what was stabilized

Short answerRust 1.4 was released on Oct 29, 2015.

Oct 29, 2015release date
0language stabilizations
0APIs stabilized
-new edition

← Rust 1.3All versionsRust 1.5 →

Can it break my build?

No compatibility notes were listed for this release.

Use it

rustup update stable        # get the newest release
rustup install 1.4          # or exactly this one
rustup override set 1.4     # pin a project to it

To require at least this version from users of your crate, set rust-version = "1.4" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.

Full release notes

Highlights

  • Windows builds targeting the 64-bit MSVC ABI and linker (instead of GNU) are now supported and recommended for use.

Breaking Changes

  • [Several changes have been made to fix type soundness and improve the behavior of associated types][sound]. See [RFC 1214]. Although we have mostly introduced these changes as warnings this release, to become errors next release, there are still some scenarios that will see immediate breakage.
  • [The str::lines and BufRead::lines iterators treat \r\n as line breaks in addition to \n][crlf].
  • [Loans of 'static lifetime extend to the end of a function][stat].
  • [str::parse no longer introduces avoidable rounding error when parsing floating point numbers. Together with earlier changes to float formatting/output, "round trips" like f.to_string().parse() now preserve the value of f exactly. Additionally, leading plus signs are now accepted][fp3].

Language

  • use statements that import multiple items [can now rename them][i], as in use foo::{bar as kitten, baz as puppy}.
  • [Binops work correctly on fat pointers][binfat].
  • pub extern crate, which does not behave as expected, [issues a warning][pec] until a better solution is found.

Libraries

  • [Many APIs were stabilized][stab]: <Box<str>>::into_string, [Arc::downgrade], [Arc::get_mut], [Arc::make_mut], [Arc::try_unwrap], [Box::from_raw], [Box::into_raw], [CStr::to_str], [CStr::to_string_lossy], [CString::from_raw], [CString::into_raw], [IntoRawFd::into_raw_fd], [IntoRawFd], IntoRawHandle::into_raw_handle, IntoRawHandle, IntoRawSocket::into_raw_socket, IntoRawSocket, [Rc::downgrade], [Rc::get_mut], [Rc::make_mut], [Rc::try_unwrap], [Result::expect], [String::into_boxed_str], [TcpStream::read_timeout], [TcpStream::set_read_timeout], [TcpStream::set_write_timeout], [TcpStream::write_timeout], [UdpSocket::read_timeout], [UdpSocket::set_read_timeout], [UdpSocket::set_write_timeout], [UdpSocket::write_timeout], Vec::append, Vec::split_off, [VecDeque::append], [VecDeque::retain], [VecDeque::split_off], [rc::Weak::upgrade], [rc::Weak], [slice::Iter::as_slice], [slice::IterMut::into_slice], [str::CharIndices::as_str], [str::Chars::as_str], [str::split_at_mut], [str::split_at], [sync::Weak::upgrade], [sync::Weak], [thread::park_timeout], [thread::sleep].
  • [Some APIs were deprecated][dep]: BTreeMap::with_b, BTreeSet::with_b, Option::as_mut_slice, Option::as_slice, Result::as_mut_slice, Result::as_slice, f32::from_str_radix, f64::from_str_radix.
  • [Reverse-searching strings is faster with the 'two-way' algorithm][s].
  • [std::io::copy allows ?Sized arguments][cc].
  • The Windows, Chunks, and ChunksMut iterators over slices all [override count, nth and last with an *O*(1) implementation][it].
  • [Default is implemented for arrays up to [T; 32]][d].
  • [IntoRawFd has been added to the Unix-specific prelude, IntoRawSocket and IntoRawHandle to the Windows-specific prelude][pr].
  • [Extend<String> and FromIterator<String are both implemented for String][es].
  • [IntoIterator is implemented for references to Option and Result][into2].
  • [HashMap and HashSet implement Extend<&T> where T: Copy][ext] as part of [RFC 839]. This will cause type inference breakage in rare situations.
  • [BinaryHeap implements Debug][bh2].
  • [Borrow and BorrowMut are implemented for fixed-size arrays][bm].
  • [extern fns with the "Rust" and "C" ABIs implement common traits including Eq, Ord, Debug, Hash][fp].
  • [String comparison is faster][faststr].
  • &mut T where T: std::fmt::Write [also implements std::fmt::Write][mutw].
  • [A stable regression in VecDeque::push_back and other capacity-altering methods that caused panics for zero-sized types was fixed][vd].
  • [Function pointers implement traits for up to 12 parameters][fp2].

Miscellaneous

Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.

← Rust 1.3All versionsRust 1.5 →

Up next

Next releaseRust 1.5Released Dec 10, 2015.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ