This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs | |
index 86b07ab..0d3e1e6 100644 | |
--- a/src/librustc/metadata/encoder.rs | |
+++ b/src/librustc/metadata/encoder.rs | |
@@ -937,7 +937,7 @@ fn encode_info_for_items(ecx: @EncodeContext, ebml_w: writer::Encoder, | |
|i, cx, v| { | |
visit::visit_item(i, cx, v); | |
match ecx.tcx.items.get(&i.id) { | |
- ast_map::node_item(_, pt) => { | |
+ &ast_map::node_item(_, pt) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/test/compile-fail/regions-glb-free-free.rs:31:12: 31:16 error: cannot infer an appropriate lifetime due to conflicting requirements | |
src/test/compile-fail/regions-glb-free-free.rs:31 Flag { //~ ERROR cannot infer an appropriate lifetime | |
^~~~ | |
src/test/compile-fail/regions-glb-free-free.rs:30:43: 37:9 note: first, the lifetime cannot outlive the lifetime &self as defined on the block at 30:43... | |
src/test/compile-fail/regions-glb-free-free.rs:30 fn set_desc(self, s: &str) -> Flag { | |
src/test/compile-fail/regions-glb-free-free.rs:31 Flag { //~ ERROR cannot infer an appropriate lifetime | |
src/test/compile-fail/regions-glb-free-free.rs:32 name: self.name, | |
src/test/compile-fail/regions-glb-free-free.rs:33 desc: s, //~ ERROR cannot infer an appropriate lifetime | |
src/test/compile-fail/regions-glb-free-free.rs:34 max_count: self.max_count, | |
src/test/compile-fail/regions-glb-free-fr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/libcore/at_vec.rs b/src/libcore/at_vec.rs | |
index d894817..bc3f547 100644 | |
--- a/src/libcore/at_vec.rs | |
+++ b/src/libcore/at_vec.rs | |
@@ -269,7 +269,7 @@ pub mod raw { | |
* * n - The number of elements to reserve space for | |
*/ | |
pub unsafe fn reserve_at_least<T>(v: &mut @[const T], n: uint) { | |
- reserve(v, uint::next_power_of_two(n)); | |
+ reserve(v, n + (n>>1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mem = {} #simple memorization | |
def byun_count(years): | |
if years in mem: | |
return mem[years] | |
count = 1 | |
life = years | |
while life > 0: | |
for i in range(2): | |
life -= 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs | |
index d859e03..23300a9 100644 | |
--- a/src/librustc/middle/check_match.rs | |
+++ b/src/librustc/middle/check_match.rs | |
@@ -498,10 +498,29 @@ pub fn specialize(cx: @MatchCheckCtxt, | |
lookup_const_by_id(cx.tcx, did).get(); | |
let e_v = eval_const_expr(cx.tcx, const_expr); | |
let match_ = match *ctor_id { | |
- val(ref v) => compare_const_vals(&e_v, v) == 0, | |
+ val(ref v) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for i in `seq 5 -1 1` | |
do | |
out= | |
for j in `seq $i -1 1` | |
do | |
out=$out* | |
done | |
echo "$out" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jihyun@ubuntu:~/.tmp$ cat star.bash | |
#!/usr/bin/env bash | |
for i in `seq 5 -1 1` | |
do | |
out= | |
for j in `seq $i -1 1` | |
do | |
out=$out* | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(test). | |
-compile([export_all]). | |
waitdown(0) -> ok; | |
waitdown(Count) -> | |
receive | |
{'DOWN', _, process, _, normal} -> | |
waitdown(Count-1) | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS=-Wall -Werror -Wextra -g -ggdb | |
main: main.c | |
gcc $(CFLAGS) $< -o $@ |
OlderNewer