Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini doc rollup #23387

Merged
merged 25 commits into from
Mar 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
00211ec
Avoid passing -L "" during cross-compilation.
rprichard Mar 13, 2015
60aa751
Improve camelcase suggestion
bombless Mar 14, 2015
85b084f
Reject `-L ""`, `-L native=`, and other empty search paths.
rprichard Mar 14, 2015
bb18a3c
Drop support for LLVM < 3.5 and fix compile errors with 3.5
dotdash Mar 14, 2015
cb02f36
Fix a typo in the documentation.
meqif Mar 14, 2015
3a8f989
Always evaluate the expression in [expr; n]
dotdash Mar 14, 2015
9eed8ea
Fix broken codegen for [expr; n] where "expr" diverges
dotdash Mar 14, 2015
c8e4f61
Fix indentation in the "Method Syntax" chapter
EduardoBautista Mar 14, 2015
7130c75
Concurrency is now in the "Concurrency" chapter
EduardoBautista Mar 14, 2015
3dd455d
Stop recommending old_io in the module doc for std::io
lilyball Mar 15, 2015
3453b5b
Remove incorrect references to _raw stdio functions
lilyball Mar 15, 2015
01f10de
Rollup merge of #23351 - nagisa:rustdoc-lines-2, r=alexcrichton
Manishearth Mar 14, 2015
7eb9c37
Rollup merge of #23356 - bombless:camelcase, r=alexcrichton
Manishearth Mar 14, 2015
6af2721
Rollup merge of #23358 - rprichard:reject-empty-L, r=alexcrichton
Manishearth Mar 14, 2015
4be0eae
Rollup merge of #23362 - dotdash:llvm_req, r=alexcrichton
Manishearth Mar 14, 2015
911f7fe
Rollup merge of #23363 - meqif:master, r=alexcrichton
Manishearth Mar 14, 2015
34ce376
Rollup merge of #23365 - dotdash:array_loop_panic, r=eddyb
Manishearth Mar 14, 2015
09e5a7a
Rollup merge of #23367 - EduardoBautista:fix-indentation-in-book, r=s…
Manishearth Mar 14, 2015
d66d0b3
Rollup merge of #23368 - EduardoBautista:fix-closures-chapter, r=stev…
Manishearth Mar 14, 2015
f59af75
Auto merge of #23381 - Manishearth:rollup, r=Manishearth
bors Mar 15, 2015
3be8380
fix typos
FuGangqiang Mar 15, 2015
3ebe249
Rollup merge of #23375 - kballard:remove-old_io-recommendation-from-i…
Manishearth Mar 15, 2015
f31d818
Rollup merge of #23379 - kballard:tweak-stdio-docs-no-raw-constructor…
Manishearth Mar 15, 2015
9d8bafe
Rollup merge of #23382 - FuGangqiang:typos, r=alexcrichton
Manishearth Mar 15, 2015
9f1240b
Rollup merge of #23384 - daboross:patch-2, r=alexcrichton
Manishearth Mar 15, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,11 @@ then
LLVM_VERSION=$($LLVM_CONFIG --version)

case $LLVM_VERSION in
(3.[2-6]*)
(3.[5-6]*)
msg "found ok version of LLVM: $LLVM_VERSION"
;;
(*)
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
;;
esac
fi
Expand Down
1 change: 1 addition & 0 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),
Expand Down
2 changes: 1 addition & 1 deletion mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) \
$$(RUST_LIB_FLAGS_ST$(1)) \
-L "$$(RT_OUTPUT_DIR_$(2))" \
-L "$$(LLVM_LIBDIR_$(2))" \
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
$$(RUSTFLAGS_$(4)) \
--out-dir $$(@D) \
Expand Down
2 changes: 1 addition & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
-L "$$(RT_OUTPUT_DIR_$(2))" \
-L "$$(LLVM_LIBDIR_$(2))" \
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
$$(RUSTFLAGS_$(4))

endef
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ is that a moving closure always takes ownership of all variables that
it uses. Ordinary closures, in contrast, just create a reference into
the enclosing stack frame. Moving closures are most useful with Rust's
concurrency features, and so we'll just leave it at this for
now. We'll talk about them more in the "Threads" section of the guide.
now. We'll talk about them more in the "Concurrency" chapter of the book.

## Accepting closures as arguments

Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ fn main() {
});
}

rx.recv().ok().expect("Could not recieve answer");
rx.recv().ok().expect("Could not receive answer");
}
```

Expand Down
8 changes: 4 additions & 4 deletions src/doc/trpl/method-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ impl CircleBuilder {
}

fn coordinate(&mut self, coordinate: f64) -> &mut CircleBuilder {
self.coordinate = coordinate;
self
self.coordinate = coordinate;
self
}

fn radius(&mut self, radius: f64) -> &mut CircleBuilder {
self.radius = radius;
self
self.radius = radius;
self
}

fn finalize(&self) -> Circle {
Expand Down
4 changes: 4 additions & 0 deletions src/librustc/session/search_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use std::slice;
use std::path::{Path, PathBuf};
use session::early_error;

#[derive(Clone, Debug)]
pub struct SearchPaths {
Expand Down Expand Up @@ -50,6 +51,9 @@ impl SearchPaths {
} else {
(PathKind::All, path)
};
if path.is_empty() {
early_error("empty search path given via `-L`");
}
self.paths.push((kind, PathBuf::new(path)));
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ impl NonCamelCaseTypes {
if i == 0 {
c.to_uppercase().collect::<String>()
} else {
c.to_string()
c.to_lowercase().collect()
}
)).collect::<Vec<_>>().concat()
}
Expand Down
8 changes: 6 additions & 2 deletions src/librustc_trans/trans/tvec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ pub fn write_content<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
}
SaveIn(lldest) => {
match ty::eval_repeat_count(bcx.tcx(), &**count_expr) {
0 => bcx,
0 => expr::trans_into(bcx, &**element, Ignore),
1 => expr::trans_into(bcx, &**element, SaveIn(lldest)),
count => {
let elem = unpack_datum!(bcx, expr::trans(bcx, &**element));
Expand Down Expand Up @@ -410,8 +410,12 @@ pub fn iter_vec_loop<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
F: FnOnce(Block<'blk, 'tcx>, ValueRef, Ty<'tcx>) -> Block<'blk, 'tcx>,
{
let _icx = push_ctxt("tvec::iter_vec_loop");
let fcx = bcx.fcx;

if bcx.unreachable.get() {
return bcx;
}

let fcx = bcx.fcx;
let loop_bcx = fcx.new_temp_block("expr_repeat");
let next_bcx = fcx.new_temp_block("expr_repeat: next");

Expand Down
4 changes: 0 additions & 4 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
// except according to those terms.

//! Traits, helpers, and type definitions for core I/O functionality.
//!
//! > **NOTE**: This module is very much a work in progress and is under active
//! > development. At this time it is still recommended to use the `old_io`
//! > module while the details of this module shake out.

#![stable(feature = "rust1", since = "1.0.0")]

Expand Down
27 changes: 9 additions & 18 deletions src/libstd/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ use sys::stdio;
/// A handle to a raw instance of the standard input stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdin_raw` function.
pub struct StdinRaw(stdio::Stdin);
/// the `std::io::stdio::stdin_raw` function.
struct StdinRaw(stdio::Stdin);

/// A handle to a raw instance of the standard output stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdout_raw` function.
pub struct StdoutRaw(stdio::Stdout);
/// the `std::io::stdio::stdout_raw` function.
struct StdoutRaw(stdio::Stdout);

/// A handle to a raw instance of the standard output stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stderr_raw` function.
pub struct StderrRaw(stdio::Stderr);
/// the `std::io::stdio::stderr_raw` function.
struct StderrRaw(stdio::Stderr);

/// Construct a new raw handle to the standard input of this process.
///
Expand All @@ -43,7 +43,7 @@ pub struct StderrRaw(stdio::Stderr);
/// handles is **not** available to raw handles returned from this function.
///
/// The returned handle has no external synchronization or buffering.
pub fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) }
fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) }

/// Construct a new raw handle to the standard input stream of this process.
///
Expand All @@ -54,7 +54,7 @@ pub fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) }
///
/// The returned handle has no external synchronization or buffering layered on
/// top.
pub fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) }
fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) }

/// Construct a new raw handle to the standard input stream of this process.
///
Expand All @@ -63,7 +63,7 @@ pub fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) }
///
/// The returned handle has no external synchronization or buffering layered on
/// top.
pub fn stderr_raw() -> StderrRaw { StderrRaw(stdio::Stderr::new()) }
fn stderr_raw() -> StderrRaw { StderrRaw(stdio::Stderr::new()) }

impl Read for StdinRaw {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { self.0.read(buf) }
Expand Down Expand Up @@ -109,9 +109,6 @@ pub struct StdinLock<'a> {
/// The `Read` trait is implemented for the returned value but the `BufRead`
/// trait is not due to the global nature of the standard input stream. The
/// locked version, `StdinLock`, implements both `Read` and `BufRead`, however.
///
/// To avoid locking and buffering altogether, it is recommended to use the
/// `stdin_raw` constructor.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn stdin() -> Stdin {
static INSTANCE: Lazy<Mutex<BufReader<StdinRaw>>> = lazy_init!(stdin_init);
Expand Down Expand Up @@ -224,9 +221,6 @@ pub struct StdoutLock<'a> {
/// provided via the `lock` method.
///
/// The returned handle implements the `Write` trait.
///
/// To avoid locking and buffering altogether, it is recommended to use the
/// `stdout_raw` constructor.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn stdout() -> Stdout {
static INSTANCE: Lazy<Mutex<LineWriter<StdoutRaw>>> = lazy_init!(stdout_init);
Expand Down Expand Up @@ -297,9 +291,6 @@ pub struct StderrLock<'a> {
/// this function. No handles are buffered, however.
///
/// The returned handle implements the `Write` trait.
///
/// To avoid locking altogether, it is recommended to use the `stderr_raw`
/// constructor.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn stderr() -> Stderr {
static INSTANCE: Lazy<Mutex<StderrRaw>> = lazy_init!(stderr_init);
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
//!
//! * Occurrences of `.` are normalized away, *except* if they are at
//! the beginning of the path (in which case they are often meaningful
//! in terms of path searching). So, fore xample, `a/./b`, `a/b/`,
//! `/a/b/.` and `a/b` all ahve components `a` and `b`, but `./a/b`
//! in terms of path searching). So, for example, `a/./b`, `a/b/`,
//! `/a/b/.` and `a/b` all have components `a` and `b`, but `./a/b`
//! has a leading current directory component.
//!
//! No other normalization takes place by default. In particular,
Expand Down
Loading