about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-07-17Remove confusing 'mutability root' termSteve Klabnik-7/+7
And some other outdated language. @echochamber came asking about these docs on IRC today, and they're a bit weird. I've updated them to be less ambiguous and use contemporary terminology.
2015-07-17Rollup merge of #27080 - soderstroff:kristof-patch, r=GankroManish Goregaokar-1/+1
I fixed a single character typo. r? @steveklabnik
2015-07-17Rollup merge of #27069 - Eljay:fix-raw-attr-typo, r=alexcrichtonManish Goregaokar-1/+1
Pretty sure this should apply to the module. r? @alexcrichton
2015-07-17Rollup merge of #25993 - nham:fix_23969, r=nikomatsakisManish Goregaokar-15/+111
Adds two error codes, one for duplicate associated constants and one for types. I'm not certain these should each have their own code, but E0201 is already solely for duplicate associated functions so at least it kinda matches. This will lead to somewhat redundant error explanations, but that's nothing new! Fixes #23969.
2015-07-16Fixed typoKristof Söderström-1/+1
2015-07-16Merge branch 'fix-26673' of https://github.com/nhowell/rust into rollup_centralSteve Klabnik-0/+6
2015-07-16Merge branch 'more-ref-fixes' of https://github.com/tshepang/rust into ↵Steve Klabnik-8/+8
rollup_central
2015-07-16Merge branch 'coercions' of https://github.com/tshepang/rust into rollup_centralSteve Klabnik-41/+66
2015-07-16Merge branch 'doc_io_traits_enums' of https://github.com/steveklabnik/rust ↵Steve Klabnik-58/+601
into rollup_central
2015-07-16Merge branch 'nopacked' of https://github.com/Stebalien/rust into rollup_centralSteve Klabnik-2/+0
2015-07-16Merge branch 'uint-usize-rustc-docs' of https://github.com/nham/rust into ↵Steve Klabnik-53/+53
rollup_central
2015-07-16Merge branch 'fix/doc/rel-prev-next' of ↵Steve Klabnik-0/+2
https://github.com/vincentbernat/rust into rollup_central
2015-07-16More docs for std::io free functions.Steve Klabnik-10/+10
2015-07-16More docs for std::io::WriteSteve Klabnik-12/+114
2015-07-16More docs for std::io::SeekSteve Klabnik-6/+27
2015-07-16More docs for std::io::ReadSteve Klabnik-12/+278
2015-07-16More docs for std::io::BufReadSteve Klabnik-32/+186
2015-07-16Fix typo in stability attribute.Lee Jeffery-1/+1
2015-07-16Fix diagnostics name clashManish Goregaokar-2/+2
2015-07-16Fixup testManish Goregaokar-1/+1
2015-07-16Fixup #27046 with pattern bindingsManish Goregaokar-12/+12
2015-07-16Rollup merge of #27046 - nrc:driver-defaults, r=alexcrichtonManish Goregaokar-3/+9
2015-07-16Rollup merge of #27039 - bluss:siphash-tests, r=alexcrichtonManish Goregaokar-69/+61
core: Revive SipHash's tests These tests were bitrotting, include them in the crate and bring them up to date and compiling.. and they pass.
2015-07-16Rollup merge of #27030 - nrc:save-ctors, r=alexcrichtonManish Goregaokar-17/+48
2015-07-16Rollup merge of #27019 - akiss77:pr-aarch64-morestack-section, r=alexcrichtonManish Goregaokar-1/+5
When building for AArch64/Linux, __morestack ends up in the .note.GNU-stack section, which causes missing references for the linker. By using the func/endfunc macros from macros.S we get __morestack right to .text (and a bit more on the side).
2015-07-16Rollup merge of #27018 - arielb1:enum-update, r=eddybManish Goregaokar-1/+23
Fixes #26948. r? @eddyb
2015-07-16Rollup merge of #26988 - frewsxcv:regression-tests, r=alexcrichtonManish Goregaokar-0/+111
"body": null,
2015-07-16Rollup merge of #26950 - AlisdairO:memset, r=alexcrichtonManish Goregaokar-0/+166
In general, it's undesirable to have read_to_end use a buffer with uninitialized memory, as that could lead to undefined behaviour in the event of a bad Read implementation. Since we control the implementations of Read for Stdin and File, however, it should be okay for us to specialise them to improve performance. This PR is to do that! Adds some unsafe code to deal with creating the buffers. Since the read_to_end function needed to be used from the io and fs crates, I moved it into a newly-created sys::common::io module. Alternatively we could expose the new read_to_end functions to allow people to create their own read_to_end implementations for code they trust. Benchmarks: Read a 2.5MB file: sys_common::io::tests::bench_init_file ... bench: 27,473,317 ns/iter (+/- 2,490,767) sys_common::io::tests::bench_uninit_file ... bench: 25,611,793 ns/iter (+/- 2,137,387) Read a buffer full of constant values sys_common::io::tests::bench_uninitialized ... bench: 12,877,645 ns/iter (+/- 931,025) sys_common::io::tests::bench_zeroed ... bench: 18,581,082 ns/iter (+/- 1,541,108) So, approx a 7% speedup for file reading, which I think is worthwhile.
2015-07-16Rollup merge of #26898 - GuillaumeGomez:fixup, r=eddybManish Goregaokar-216/+539
r? @eddyb First part of the improvement. I then intend to improve resolve_error as indicated by @eddyb. Do not merge for now (please !).
2015-07-16Rollup merge of #26838 - P1start:refactor-diagnostic, r=alexcrichtonManish Goregaokar-396/+392
2015-07-16Rollup merge of #26819 - P1start:ref-suggestion, r=nikomatsakisManish Goregaokar-2/+46
The error now looks like this: ``` <anon>:4:9: 4:10 error: use of moved value: `x` [E0382] <anon>:4 foo(x); ^ <anon>:3:9: 3:10 note: `x` moved here because it has type `Box<i32>`, which is moved by default <anon>:3 let y = x; ^ <anon>:3:9: 3:10 help: use `ref` to take a reference instead: <anon>: let ref y = x; ```
2015-07-16Rollup merge of #27029 - nrc:save-pub-gen-code, r=alexcrichtonManish Goregaokar-1/+1
2015-07-16Rollup merge of #27020 - goyox86:goyox86/fix-error-handling-snippet, ↵Manish Goregaokar-1/+3
r=steveklabnik This PR fixes a snippet of code on the error handling chapter of \"The Rust Programming Language\". //cc @steveklabnik The docs state that trying to compile the snippet will yield the following error: ```bash anon>:13:5: 20:6 error: non-exhaustive patterns: `_` not covered [E0004] ``` But instead the error received is: ```bash <anon>:22:46: 22:56 error: unresolved name `NewRelease` <anon>:22 std::io::println(descriptive_probability(NewRelease)); ^~~~~~~~~~ <anon>:22:5: 22:21 error: unresolved name `std::io::println` <anon>:22 std::io::println(descriptive_probability(NewRelease)); ^~~~~~~~~~~~~~~~ error: aborting due to 2 previous errors playpen: application terminated with error code 101 ``` After applying this PR the expected error is returned: ```bash anon>:13:5: 20:6 error: non-exhaustive patterns: `_` not covered [E0004] <anon>:13 match probability(&event) { <anon>:14 1.00 => \"certain\", <anon>:15 0.00 => \"impossible\", <anon>:16 0.00 ... 0.25 => \"very unlikely\", <anon>:17 0.25 ... 0.50 => \"unlikely\", <anon>:18 0.50 ... 0.75 => \"likely\", ... <anon>:13:5: 20:6 help: see the detailed explanation for E0004 error: aborting due to previous error ```
2015-07-16Rollup merge of #27013 - michaelsproul:fix-E0303, r=alexcrichtonManish Goregaokar-4/+4
A merge in #24523 broke the explanation for E0303. This commit restores the previous version and also removes an erroneous `&` (which had nothing to do with the merge).
2015-07-16Rollup merge of #26977 - brson:stddoc, r=GankroManish Goregaokar-35/+229
Yet another attempt to make the prose on the std crate page clearer and more informative. This does a lot of things: tightens up the opening, adds useful links (including a link to the search bar), offers guidance on how to use the docs, and expands the prelude docs as a useful newbie entrypoint. r? @steveklabnik cc @aturon
2015-07-16Rollup merge of #26695 - rutsky:patch-2, r=ManishearthManish Goregaokar-2/+2
r? @steveklabnik
2015-07-15Remove reference to gdb-pretty-struct-and-enums.rsTamir Duberstein-4/+0
It was removed in bba934f19ab26d5afc4f0be923ea699010883906. Fixes #27059.
2015-07-15doc: add rel=prev/next for links to adjacent sectionsVincent Bernat-0/+2
This help people using keyboard navigation or with disabilities to easily browse through pagination. For example, in Vimium, a reader can do `[[` or `]]` to browse through the pages.
2015-07-15Add specializations of read_to_end for Stdin, TcpStream and File,Alisdair Owens-0/+166
allowing them to read into a buffer containing uninitialized data, rather than pay the cost of zeroing.
2015-07-15Better detection of duplicate associated items.Nick Hamann-15/+111
Expands E0201 to be used for any duplicate associated items, not just duplicate methods/functions. It also correctly detects when two different kinds of items (like a constant and a method) have the same name. Fixes #23969.
2015-07-14Change int/uint => isize/usize in compiler docs.Nick Hamann-53/+53
2015-07-15Some more default implementations for the compiler driver callbacks.Nick Cameron-3/+9
2015-07-14Address more feedbackBrian Anderson-3/+3
2015-07-14Don't mention packed attribute in reference.mdSteven Allen-2/+0
2015-07-14Remove macro, import function and enumGuillaume Gomez-158/+155
2015-07-14Address more feedbackBrian Anderson-4/+5
2015-07-14core: Revive SipHash's testsUlrik Sverdrup-69/+61
These tests were bitrotting, include them in the crate and bring them up to date and compiling.. and they pass.
2015-07-14don't ICE when FRU is used on an enum variantAriel Ben-Yehuda-1/+23
Fixes #26948.
2015-07-14Arguments are now passed directly to the function instead of the enum variantsGuillaume Gomez-196/+197
2015-07-14Add regression test for #21140Corey Farwell-1/+18
Closes #21140