Skip to content

Rollup of PRs in the queue; Sunday #23381

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

Merged
merged 18 commits into from
Mar 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 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
b09e5da
Split rustdoc summary lines in a smarter way
nagisa Mar 13, 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
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
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
19 changes: 10 additions & 9 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> io::Result<String> {
ty: shortty(item),
name: item.name.clone().unwrap(),
path: fqp[..fqp.len() - 1].connect("::"),
desc: shorter(item.doc_value()).to_string(),
desc: shorter(item.doc_value()),
parent: Some(did),
search_type: None,
});
Expand Down Expand Up @@ -935,7 +935,7 @@ impl DocFolder for Cache {
ty: shortty(&item),
name: s.to_string(),
path: path.connect("::").to_string(),
desc: shorter(item.doc_value()).to_string(),
desc: shorter(item.doc_value()),
parent: parent,
search_type: get_index_search_type(&item, parent_basename),
});
Expand Down Expand Up @@ -1527,13 +1527,14 @@ fn full_path(cx: &Context, item: &clean::Item) -> String {
return s
}

fn shorter<'a>(s: Option<&'a str>) -> &'a str {
fn shorter<'a>(s: Option<&'a str>) -> String {
match s {
Some(s) => match s.find("\n\n") {
Some(pos) => &s[..pos],
None => s,
},
None => ""
Some(s) => s.lines().take_while(|line|{
(*line).chars().any(|chr|{
!chr.is_whitespace()
})
}).collect::<Vec<_>>().connect("\n"),
None => "".to_string()
}
}

Expand Down Expand Up @@ -1663,7 +1664,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
</tr>
",
*myitem.name.as_ref().unwrap(),
Markdown(shorter(myitem.doc_value())),
Markdown(&shorter(myitem.doc_value())[..]),
class = shortty(myitem),
href = item_path(myitem),
title = full_path(cx, myitem),
Expand Down
Loading