Skip to content

Instantly share code, notes, and snippets.

@tbillington
tbillington / rustc_panic_1_76_0_stable.rs
Created February 15, 2024 03:52
rustc panic on 1.76.0 stable
thread 'rustc' panicked at compiler/rustc_middle/src/dep_graph/dep_node.rs:198:17:
Failed to extract DefId: def_kind 782b879c3be8bf9f-b973b824051e0071
stack backtrace:
0: 0x1031e8594 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb478ebbfb46e27ce
1: 0x10322a9ac - core::fmt::write::he4d5fa2daff1f531
2: 0x1031ded9c - std::io::Write::write_fmt::hc5a47a68eba63d9f
3: 0x1031e83c8 - std::sys_common::backtrace::print::h79bd952cc5812e7a
4: 0x1031eae90 - std::panicking::default_hook::{{closure}}::h82301f6222887737
5: 0x1031eabd8 - std::panicking::default_hook::h1e49abbb3f1d7dbf
6: 0x10b906070 - <alloc[37ddc2533ea56b7b]::boxed::Box<rustc_driver_impl[d723ad74a265baf3]::install_ice_hook::{closure#0}> as core[18650a1770591c75]::ops::function::Fn<(&dyn for<'a, 'b> core[18650a1770591c75]::ops::function::Fn<(&'a core[18650a1770591c75]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[18650a1770591c75]::marker::S
package main
import (
"fmt"
"net/http"
"golang.org/x/net/websocket"
)
var i int = 0
// Regular meta boost
$mb = new ElementMetaBoost("hobbies", array());
// Add
$mb = new AddMetaBoost(new ElementMetaBoost("hobbies", array()), 0.2); // Worth 0.2 (20%) of score
// Regular meta boost
ElementMetaBoost("hobbies", array())
// Add
AddMetaBoost(ElementMetaBoost("hobbies", array()), 0.2)
package main
import (
"encoding/json"
"fmt"
"io"
"os"
)
type parts struct {
for _, p := range jsonParts.Parts {
fmt.Println(p)
stuff[p.Type] = func(p part) {
return func(data interface{}) {
fmt.Println(p.Args)
fmt.Println(p.Properties)
}
}(p)
}
type part struct {
Type string `json:type`
Args map[string]string `json:args`
Properties map[string]string `json:properties`
}
type binFunc func(interface{})
stuff := map[string]binFunc{}
@tbillington
tbillington / stuff.go
Created December 22, 2015 10:41
golang thing
stuff := map[string]binFunc{}
for _, p := range jsonParts.Parts {
fmt.Println(p)
stuff[p.Type] = func() {
return func(data interface{}) {
fmt.Println(p.Args)
fmt.Println(p.Properties)
}
}()
public static class ViewHolder extends RecyclerView.ViewHolder {
public LinearLayout linearLayout;
public ImageView image;
public TextView headingText;
public TextView skillText;
public ViewHolder(LinearLayout v) {
super(v);
linearLayout = v;
image = ((ImageView)((ViewGroup)((ViewGroup)((ViewGroup)linearLayout.getChildAt(0)).getChildAt(0)).getChildAt(0)).getChildAt(0));
headingText = ((TextView)((ViewGroup)((ViewGroup)((ViewGroup)linearLayout.getChildAt(0)).getChildAt(0)).getChildAt(0)).getChildAt(1));
@tbillington
tbillington / main.rs
Created August 19, 2015 06:19
rust error
extern crate iron;
extern crate router;
use iron::{BeforeMiddleware, AfterMiddleware, typemap, Iron, Request, Response, IronResult};
use router::{Router};
fn hello_world(_: &mut Request) -> IronResult<Response> {
Ok(Response::with((iron::status::Ok, "Hello World\n")))
}