Skip to content

Instantly share code, notes, and snippets.

@nagisa
nagisa / block_map.md
Created May 10, 2024 16:20 — forked from pavelmaca/block_map.md
Pylontech Force H2 - Solarman Modbus RTU registry map
Start End Block description
3972 3972 Unknown
4096 4111 Brand and model name
4112 4239 Empty
4320 4320 Date and time
4352 4415 Same as 5120-5183
4416 4607 Empty
4608 4671 Unknown, maybe settings (seems static)
4672 4863 Empty
@nagisa
nagisa / Cargo.toml
Last active February 11, 2020 17:31
[workspace]
members = [
"brand_new",
"old_rusty",
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# seqcst store/load:
data memory barrier
store/load
data memory barrier
# acquire load:
data memory barrier
  • Feature Name: type_name
  • Start Date: 2018-04-21
  • RFC PR: (leave this empty)
  • Rust Issue: (leave this empty)

Summary

Make the output of type_name structured and convenient and put the intrinsic on the path to sabilisation.

diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index afd399b..1665723 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -1266,13 +1266,13 @@ pub trait Iterator {
let mut other = other.into_iter();
loop {
- match (self.next(), other.next()) {
- (None, None) => return Ordering::Equal,
trait Monoid<T> {
let zero : T;
// Arbitrary 2 argument functions may be used as binary operators
let `+` : T → T → T;
}
#![feature(placement_in_syntax, test)]
#![feature(placement_new_protocol)]
use std::ops::{Placer, Place, InPlace};
#[cfg(test)] extern crate test;
#[cfg(test)] use test::Bencher;
pub struct MyVec<T>(Vec<T>);
pub struct MyVecEmplace<'a, T: 'a>(*mut T, &'a mut MyVec<T>);
#![feature(unicode, core_intrinsics)]
struct MyString(String);
impl From<Vec<char>> for MyString {
fn from(mut chars: Vec<char>) -> MyString {
let mut bytes_used = 0usize;
let length = chars.len();
for index in 0..length {
let current_char = unsafe { *chars.get_unchecked(index) };
let output_buf: &mut [u8] = unsafe {
enum B {}
impl B {
fn bb() -> i32 { 0 }
}
fn main() {
match 0 {
B::bb => {}
}