about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-09-24Auto merge of #28607 - remram44:doc-fix-str-pattern, r=alexcrichtonbors-12/+9
Reported by Moonlightning on #rust > 17:13 EDT < Moonlightning> I think I found a bug in the str::matches() documentation. Was it copied from str::split()? :p > 17:13 EDT < Moonlightning> Because it says “The pattern can be a simple `&str`, `char`, or a closure that determines the split.” I changed "determines the split" to "determines if a character matches". It's not super clear, "determines the split" is not super clear to begin with, maybe this can be made better? On the other hand following the link to Pattern provides enough details.
2015-09-24Auto merge of #28598 - semarie:openbsd-unbreak, r=alexcrichtonbors-1/+3
separate use code between openbsd/netbsd netbsd use c_int and c_uint, but openbsd not, resulting a unused_import error. r? @alexcrichton problem introduced by #28543
2015-09-23Auto merge of #28596 - sanxiyn:dedup-unused, r=alexcrichtonbors-2/+21
Fix #22599.
2015-09-23Auto merge of #28569 - semarie:stdcpp-tests, r=alexcrichtonbors-0/+5
extend the search path of libraries to /usr/local/lib in `run-make` testsuite. It should permit to find libstdc++.so on usual directory. r? @alexcrichton
2015-09-23Fix bad copypasta for patterns doc in std::strRemi Rampin-12/+9
2015-09-23unbreak openbsd after netbsd integrationSébastien Marie-1/+3
separate use code between openbsd/netbsd. netbsd use c_int and c_uint, but openbsd not, resulting a unused_import error.
2015-09-23Auto merge of #28585 - ranma42:simpler-panic, r=alexcrichtonbors-83/+5
This is part of some cleanup I did while investigating #28129. This also ensures that `on_panic` is run even if the user has registered too many callbacks.
2015-09-23Do not traverse RHS of assignment twice for unused variables lintSeo Sanghyeon-2/+21
walk_expr includes call to visit_expr for subexpressions.
2015-09-23Auto merge of #28580 - wesleywiser:split_out_type_lints, r=alexcrichtonbors-661/+689
Move out the `TypeLimits` and `ImproperCTypes` lints into a separate module. Part of #22206
2015-09-23Auto merge of #28535 - petrochenkov:name, r=nrcbors-473/+485
Part of https://github.com/rust-lang/rust/issues/6993 This patch replaces `Ident`s with `Name`s in data structures of HIR and updates the dependent crates to compile and pass `make check`. Some HIR structures still use `Ident`s, namely `PathSegment`, `PatIdent`, `ExprWhile`, `ExprLoop`, `ExprBreak` and `ExprAgain`, they need them for resolve (but `PathSegment` is special, see https://github.com/rust-lang/rust/issues/6993#issuecomment-141256292). r? @nrc
2015-09-22Auto merge of #28504 - Eljay:fix-trait-privacy, r=nrcbors-6/+53
Fixes #16264 / #18241. As far as I can tell, it should be impossible for a trait to be inaccessible if it's in scope, so this check is unnecessary. Are there any cases where this check is actually needed?
2015-09-22Auto merge of #28369 - ebfull:fix-higher-ranked, r=nikomatsakisbors-3/+36
Fixes #28279. Currently `common_supertype(*mut for<'a> Fn(&'a usize), *mut for<'a> Fn(&'a usize) + 'static)` equals `*mut Fn(&usize)` which seems to be caused by `higher_ranked_sub()` allowing region variables to escape the comparison. This prevents inference from working properly with stuff like `Rc<Fn(&T)>`. r? @nikomatsakis
2015-09-22Auto merge of #28543 - gandro:netbsd, r=alexcrichtonbors-68/+602
These changes introduce the ability to cross-compile working binaries for NetBSD/amd64. Previous support added in PR #26682 shared all its code with the OpenBSD implementation, and was therefore never functional (e.g. linking against non-existing symbols and using wrong type definitions). Nonetheless, the previous patches were a great starting point and made my work significantly easier. :smiley: Because there are no stage0 snapshots for NetBSD (yet), I used a cross-compiler for NetBSD 7.0 RC3 and only tested some toy programs (threading and channels, stack guards, a small TCP/IP echo server and some other platform dependent bits). If someone could point me to documentation on how to generate a stage0 snapshot from a cross-compiler I'm happy to run the full test suite. A few other notes regarding Rust on NetBSD/amd64: - To preserve binary compatibility, NetBSD introduces new symbols for system call wrappers on breaking ABI changes and keeps the old (legacy) symbols around, see [this documentation](https://www.netbsd.org/docs/internals/en/chap-processes.html#syscalls_master) for some details. I went ahead and modified the `libc` and `std` crate to use the current (renamed) symbols instead of the legacy ones where I found them, but I might have missed some. Notably using the `sigaction` symbol (deprecated in 1998) instead of `__sigaction14` even triggers SIGSYS (bad syscall) on my amd64 setup. I also changed the type definitions to use the most recent version. - NetBSD's gdb doesn't really support position independent executables, so you might want to turn that off for debugging, see [NetBSD Problem Report #48250](https://gnats.netbsd.org/48250). - For binaries invoked using a relative path, NetBSD supports `$ORIGIN` only for short `rpath`s (~64 chars or so, I'm told). If running an executable fails with `execname not specified in AUX vector: No such file or directory`, consider invoking the binary using its full absolute path.
2015-09-22Fix rebaseVadim Petrochenkov-31/+31
2015-09-22Remove unwind::registerAndrea Canciani-69/+2
The `register` function is unstable and it is not used anymore, hence it can be removed (together with the now-unused `Callback` type and `static` variables).
2015-09-22Restore `fold_ident` and `visit_ident`Vadim Petrochenkov-13/+22
2015-09-22Use Names in the remaining HIR structures with exception of...Vadim Petrochenkov-86/+86
PathSegment, PatIdent, ExprWhile, ExprLoop, ExprBreak and ExprAgain - they need Idents for resolve
2015-09-22Use Names in path fragments and MacroDefVadim Petrochenkov-39/+40
2015-09-22run-make: search libstdc++ in /usr/local/lib tooSébastien Marie-0/+5
extend the search path of libraries to /usr/local/lib in `run-make` testsuite. It should permit to find libstdc++.so on usual directory.
2015-09-22Use Names in hir::{Field, ExprMethodCall, ExprField}Vadim Petrochenkov-91/+79
2015-09-22Use Names in HIR ItemsVadim Petrochenkov-205/+206
2015-09-22Use Names in HIR visitors and foldersVadim Petrochenkov-65/+67
2015-09-22Encode/decode Names as stringsVadim Petrochenkov-2/+13
2015-09-22Auto merge of #28584 - ranma42:simpler-innertry, r=alexcrichtonbors-9/+11
This simplifies a little inner_try and avoids multiple accesses to TLS.
2015-09-22Auto merge of #28582 - jedireza:patch-1, r=huonwbors-1/+1
Fixed typo in example code.
2015-09-22Fix alignment of pthread types on NetBSDSebastian Wicki-11/+19
2015-09-22Auto merge of #28578 - gandro:nodefaultlibs, r=alexcrichtonbors-7/+13
This patch basically adds a target option for omitting the `-nodefaultlibs` flag when invoking the linker. I am not sure if this is the correct or only way to approach this problem, so any feedback is welcome. Motivation: I'm currently working on a Rust target specification for the [rumprun](/rumpkernel/rumprun) unikernel. rumprun is based on rump kernels and uses NetBSDs libc and drivers to provide a POSIXy environment. It provides its own linker wrapper that generates binaries which can be "baked" into a unikernel after configuration. Using `-nodefaultlibs` on the rumprun linker will prevent it from selecting the search paths for the rumprun libraries. My current target implementation for rumprun is here: gandro/rust@295744b2ee2378f41a20d4b498b8f1991a75e93c Currently, only a target that `is_like_windows` will omit the `-nodefaultlibs` flag, but since rumprun is not like Windows otherwise, I think a separate flag makes more sense. This might be a breaking change for target specifications that have the `is_like_windows` option set to true. Such targets need to set `no_default_libraries` to false in order to restore the old behavior.
2015-09-22Simplify inner_try in std::rt::unwind::tryAndrea Canciani-9/+11
Resolve the TLS PANICKING variable just once and re-use it as needed.
2015-09-22Simplify on_panic callback handlingAndrea Canciani-16/+5
The registration of `panicking::on_panic` as a general-purpose callback is overcomplicated and can fail. Instead, invoking it explicitly removes the need for locking and paves the way for further improvements.
2015-09-22Add UFCS privacy test.Lee Jeffery-0/+24
2015-09-22Auto merge of #28574 - Eljay:hoedown-3.0.5, r=alexcrichtonbors-0/+0
Closes #28251.
2015-09-21Update error-handling.mdReza Akhavan-1/+1
2015-09-22Auto merge of #28427 - DiamondLovesYou:gdb-debug-script-load, r=alexcrichtonbors-4/+50
This is so LLVM isn't forced to load every byte of it. Also sets the alignment of the load. Adds a test for the debug script section. r? @alexcrichton
2015-09-22Auto merge of #28364 - petrochenkov:usegate, r=alexcrichtonbors-58/+209
Closes https://github.com/rust-lang/rust/issues/28075 Closes https://github.com/rust-lang/rust/issues/28388 r? @eddyb cc @brson
2015-09-21Split out the type lints into a new moduleWesley Wiser-661/+689
Part of #22206
2015-09-22Add `no_default_libraries` target linker optionSebastian Wicki-7/+13
If set to false, `-nodefaultlibs` is not passed to the linker. This was the default behavior on Windows, but it should be configurable per target. This is a [breaking-change] for target specifications that have the `is_like_windows` option set to true. Such targets need to set `no_default_libraries` to false in order to restore the old behavior.
2015-09-21Auto merge of #28567 - sanxiyn:save-lto, r=alexcrichtonbors-2/+14
This is useful for debugging LTO issues, #28066 for example.
2015-09-21Avoid loading the whole gdb debug scripts section.Richard Diamond-4/+50
This is so LLVM isn't forced to load every byte of it. Also sets the alignment of the load. Adds a test for the debug script section.
2015-09-21Upgrade hoedown to 3.0.5.Eljay-0/+0
2015-09-21Auto merge of #28566 - Ms2ger:AsmDialect, r=sanxiynbors-25/+12
2015-09-21Various fixes for NetBSD/amd64Sebastian Wicki-68/+594
2015-09-21Auto merge of #28562 - llogiq:shootout, r=alexcrichtonbors-1/+2
Since 1.3.0 the BufWriter has seen tremendous speedups. So when I use it in the shootout benchmarks, I see some nice speedup (which up to 1.2.0 was nixed by the pessimizations during initialization).
2015-09-21Auto merge of #28531 - whitequark:patch-1, r=Gankrobors-3/+9
With -O2, LLVM's inliner can remove this code, but this does not happen with -O1 and lower. As a result, dropping Vec<u8> was linear with length, resulting in abysmal performance for large buffers. See issue #24280.
2015-09-22Save bitcode before LTO when -C save-temps is givenSeo Sanghyeon-2/+14
2015-09-21Use ast::AsmDialect's variants qualified, and drop the pointless prefix.Ms2ger-9/+9
2015-09-21Auto merge of #28565 - apasel422:issue-28561, r=Manishearthbors-0/+120
Closes #28561. r? @Manishearth
2015-09-21Add tests for macro-based implsAndrew Paseltiner-0/+120
Closes #28561.
2015-09-21Remove hir::AsmDialect in favour of ast::AsmDialect.Ms2ger-19/+6
2015-09-21Auto merge of #28563 - baskerville:trpl-typo, r=blussbors-1/+1
2015-09-21TRPL: Fix typoBastien Dejean-1/+1