View xargo-steed_issue
Socrates:hello-world3 bRad$ lld
lld is a generic driver.
Invoke ld.lld (Unix), ld (macOS) or lld-link (Windows) instead.
Socrates:hello-world3 bRad$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-278.4
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 8.1.0, (clang-802.0.41)
TAPI support using: Apple TAPI version 1.33.11
View Iterator Extension Method Practice.rs
trait MyFilter: Iterator {
fn my_filter_arg(self, arg: Self::Item) -> MyFilterArgState<Self> where Self: Sized, {
MyFilterArgState { iter: self, arg: arg }
}
fn my_filter<P>(self, predicate: P) -> MyFilterState<Self, P> where Self: Sized,
P: Fn(&Self::Item) -> bool,
Self::Item: PartialEq, {
MyFilterState { iter: self, predicate: predicate }
}
}
View borrowing_generic_iterator.rs
#![allow(unused_variables)]
trait ArgsExtMethods<'a, T> where Self: Iterator<Item = &'a T>,
T: Sized + 'a {
fn get_item_following_target(&mut self, target: T) -> Option<Self::Item> where Self: Sized,
T: PartialEq;
}
impl<'a, I, T> ArgsExtMethods<'a, T> for I where I: Iterator<Item = &'a T>,
T: Sized + PartialEq + 'a {
#[inline]
View DeclarativeExcerpt.cs
return parser.ServiceNode.Nodes.OfType<TreeNode>()
.SelectMany(n => n.Nodes.OfType<TreeNode>())
.Single(n => n.Text == Protocol.Values[(int)protocol])
.Nodes.OfType<TreeNode>();
View 1 - Fails to compile.rs
//Transform iterable collection of Strings to iterable collection of &str and pass to libMain()
fn main() {
xargo_lld_wrapper::libMain(std::env::args().map(|el| el.as_str()).collect::<Vec<_>>());
}
--
/Users/bRad/.cargo/bin/cargo test --color=always -- --nocapture
Compiling xargo-lld-wrapper v0.1.0 (file:///Users/bRad/Development/bg/experiments/rust/rpi3/xargo-lld-wrapper)
error: `el` does not live long enough
--> src/main.rs:4:68
View lib.rs
trait ArgsExtensionMethods {
fn getOutputFilename(self) -> Option<String>;
// fn removeOutputFile(&self) -> Args;
// fn removeNoStartFiles(&self) -> Args;
// fn removeWlSwitches(&self) -> Args;
}
//
impl<T> ArgsExtensionMethods for T where T: IntoIterator<Item=String> {
fn getOutputFilename(self) -> Option<String> {
self.skip_while(|ref el| *el != "-o").next()
View Steed_Issue
xargo run --target armv7-unknown-linux-steedeabihf
Compiling core v0.0.0 (file:///Users/bRad/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore)
Compiling std_unicode v0.0.0 (file:///Users/bRad/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd_unicode)
Compiling alloc v0.0.0 (file:///Users/bRad/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/liballoc)
Compiling collections v0.0.0 (file:///Users/bRad/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcollections)
Finished release [optimized] target(s) in 19.41 secs
Compiling rand v0.0.0 (file:///Users/bRad/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/librand)
Finished release [optimized] target(s) in 1.58 secs
Updating git repository `https://github.com/japaric/steed`
Updating git repository `https://github.com/redox-os/ralloc`
View workspace.sh
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
View workspace.sh
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
View gist:46a8e03da7e72a974465d4e916d00ff2
Socrates:hello bRad$ cargo build --target=armv7-unknown-linux-gnueabihf
Compiling hello v0.1.0 (file:///Users/bRad/Development/bg/experiments/rust/rpi3/hello)
error: linking with `arm-none-eabi-gcc` failed: exit code: 1
|
= note: "arm-none-eabi-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/Users/bRad/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/Users/bRad/Development/bg/experiments/rust/rpi3/hello/target/armv7-unknown-linux-gnueabihf/debug/deps/hello-482a13dcff2890d3.0.o" "-o" "/Users/bRad/Development/bg/experiments/rust/rpi3/hello/target/armv7-unknown-linux-gnueabihf/debug/deps/hello-482a13dcff2890d3" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/Users/bRad/Development/bg/experiments/rust/rpi3/hello/target/armv7-unknown-linux-gnueabihf/debug/deps" "-L" "/Users/bRad/Development/bg/experiments/rust/rpi3/hello/target/debug/deps" "-L" "/Users/bRad/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,