Skip to content

Commit

Permalink
fmt & nightly_yew for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza1311 committed Aug 14, 2022
1 parent 3495b5c commit c49afe2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ci/build-examples.sh
Expand Up @@ -24,12 +24,13 @@ for path in examples/*; do
# shellcheck disable=SC2164
cd "$path"
dist_dir="$output/$example"
export RUSTFLAGS="--cfg nightly_yew"
if [[ "$example" == "boids" || "$example" == "password_strength" ]]; then
# works around issue rust-lang/rust#96486
# where the compiler forgets to link some symbols connected to const_eval
# only an issue on nightly and with build-std enabled which we do for code size
# this deoptimizes only the examples that otherwise fail to build
export RUSTFLAGS="-Zshare-generics=n -Clto=thin"
export RUSTFLAGS="-Zshare-generics=n -Clto=thin $RUSTFLAGS"
fi

trunk build --release --dist "$dist_dir" --public-url "$PUBLIC_URL_PREFIX$example"
Expand Down
5 changes: 1 addition & 4 deletions packages/yew/src/lib.rs
Expand Up @@ -2,10 +2,7 @@
#![doc(html_logo_url = "https://yew.rs/img/logo.png")]
#![cfg_attr(documenting, feature(doc_cfg))]
#![cfg_attr(documenting, feature(doc_auto_cfg))]
#![cfg_attr(
nightly_yew,
feature(fn_traits, async_closure, unboxed_closures)
)]
#![cfg_attr(nightly_yew, feature(fn_traits, async_closure, unboxed_closures))]

//! # Yew Framework - API Documentation
//!
Expand Down

0 comments on commit c49afe2

Please sign in to comment.